Skip to content

Commit

Permalink
Adding TouchOSC feedback for Fairlight audio #202
Browse files Browse the repository at this point in the history
  • Loading branch information
SteffeyDev committed Mar 6, 2021
1 parent c94e2e7 commit 5c2071c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions atemOSC/FeedbackMonitors.mm
Original file line number Diff line number Diff line change
Expand Up @@ -950,11 +950,17 @@
mixOptionString = @"off";

sendFeedbackMessage(switcher, [NSString stringWithFormat:@"/audio/input/%lld/mix", inputId_], [OSCValue createWithString:mixOptionString]);
sendFeedbackMessage(switcher, [NSString stringWithFormat:@"/audio/input/%lld/mix/afv", inputId_], [OSCValue createWithFloat:[mixOptionString isEqualToString:@"afv"] ? 1.0 : 0.0]);
sendFeedbackMessage(switcher, [NSString stringWithFormat:@"/audio/input/%lld/mix/on", inputId_], [OSCValue createWithFloat:[mixOptionString isEqualToString:@"on"] ? 1.0 : 0.0]);
sendFeedbackMessage(switcher, [NSString stringWithFormat:@"/audio/input/%lld/mix/off", inputId_], [OSCValue createWithFloat:[mixOptionString isEqualToString:@"off"] ? 1.0 : 0.0]);

NSString *address = @"/audio/input/%lld/left/mix";
if (sourceId_ == std::prev(switcher.mFairlightAudioSources[inputId_].end())->first)
address = @"/audio/input/%lld/right/mix";
sendFeedbackMessage(switcher, [NSString stringWithFormat:address, inputId_], [OSCValue createWithString:mixOptionString]);
sendFeedbackMessage(switcher, [NSString stringWithFormat:@"%@/afv", address], [OSCValue createWithFloat:[mixOptionString isEqualToString:@"afv"] ? 1.0 : 0.0]);
sendFeedbackMessage(switcher, [NSString stringWithFormat:@"%@/on", address], [OSCValue createWithFloat:[mixOptionString isEqualToString:@"on"] ? 1.0 : 0.0]);
sendFeedbackMessage(switcher, [NSString stringWithFormat:@"%@/off", address], [OSCValue createWithFloat:[mixOptionString isEqualToString:@"off"] ? 1.0 : 0.0]);
}
}

Expand Down

0 comments on commit 5c2071c

Please sign in to comment.