To stop a mixer bus render callback, one can stop the graph, remove the bus and restart the graph. But I have two requirements:
A. Do not want to stop/re-start the graph.
B. Do not want to remove the mixer bus.
I can disable / enable a specified bus with:
OSStatus result = AudioUnitSetParameter (
mixerUnit,
kMultiChannelMixerParam_Enable,
kAudioUnitScope_Input,
inputBus, //the specified bus number
isOnValue, //on:YES or off:NO
0
);
But that did not prevent the render callback for the specified bus from getting called. Currently, I do this by using an if statement in the render callback function to filter out that specific bus.
Is there a way to achieve what I try to do? (without using my current solution)