Notification when audio device changes

I've had some issues when switching playback between bluetooth and phone speaker/headphones, in that my phone uses a different samplerate than the bluetooth speaker.

I realized that the prepareToPlay doesn't get called when the device, and therefore samplerate, changes.

looking at juce_ios_Audio.cpp, the routingChanged function doesn't send out notifications.

would it make sense to call callback->audioDeviceAboutToStart (this) at the end of the function? This fixes my problem. Am I missing something?




Thanks - we're actually in the middle of rewriting the whole iOS audio class because Apple have deprecated the original APIs, so it'll be all different soon, but we'll take this into account for the new version!

cool, looking forward to it.

Do you have an ETA?


No ETA, but very soon, it's a work-in-progress.