Here is the beginning of setAudioDeviceSetup:
String AudioDeviceManager::setAudioDeviceSetup (const AudioDeviceSetup& newSetup, const bool treatAsChosenDevice) { jassert (&newSetup != ¤tSetup); // this will have no effect if (newSetup == currentSetup && currentAudioDevice != nullptr) return String(); if (! (newSetup == currentSetup)) sendChangeMessage();
Is there a reason why sendChangeMessage() is called so early in the function?
I've set a class up to listen to my AudioDeviceManager instance so that I can display some information on the selected input and output channels, but when I call:
void changeListenerCallback(ChangeBroadcaster *source) { AudioDeviceManager::AudioDeviceSetup setup; source->getAudioDeviceSetup(setup); DBG(setup.inputChannels.toString(2));
the changes that I have applied to my AudioDeviceSetup before calling setAudioDeviceSetup are not there anymore.
Am I using it wrong?