Skip to content

Commit dc4e4b8

Browse files
committed
Report source type in item navigation
When navigating through items, the source type (audio, video, midi) is announced when reporting take information (see issue #1066).
1 parent 7b0814d commit dc4e4b8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/reaper_osara.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -3157,6 +3157,13 @@ void cmdGoToMasterTrack(Command* command){
31573157
postGoToTrack(0);
31583158
}
31593159

3160+
string getReportableSourceType(const char* type) {
3161+
if((!type)||(!*type)) return "";
3162+
string reported_type=type;
3163+
if((reported_type=="VIDEO")||(reported_type=="MIDI")) return reported_type;
3164+
return "AUDIO";
3165+
}
3166+
31603167
void moveToItem(int direction, bool clearSelection=true, bool select=true) {
31613168
unsigned int undoMask = getConfigUndoMask();
31623169
bool makeUndoPoint = undoMask&1;
@@ -3236,6 +3243,9 @@ void moveToItem(int direction, bool clearSelection=true, bool select=true) {
32363243
}
32373244
MediaItem_Take* take = GetActiveTake(item);
32383245
if (take) {
3246+
if (auto* source = (PCM_source*)GetSetMediaItemTakeInfo(take, "P_SOURCE", nullptr)) {
3247+
s << " " << getReportableSourceType(source->GetType());
3248+
}
32393249
s << " " << GetTakeName(take);
32403250
}
32413251
int takeCount = CountTakes(item);

0 commit comments

Comments
 (0)