Receiver/speaker routing on iOS


#1

In juce_ios_Audio.cpp, in the open(…)-method for the audio device, there is a call to the function fixAudioRouteIfSetToReceiver(), to counteract the fact that iOS turns your app volume down when specifying a recording input. So far, so good. Now, in my specific situation, I am using an image picker to choose movies from the library (or to record a new movie). When showing the image picker, the routing is automatically changed to “receiver” mode again, which makes all app sound rather quiet afterwards. JUCE is already registering for audio routing changes, so an easy fix is to call fixAudioRouteIfSetToReceiver again in routingChanged(…), which is what I humbly propose… :smiley:


#2

Any thoughts?


#3

I've run into a similar issue. My app plays out the speaker, headphones get plugged in and it plays out the headphone, headphone gets unplugged, it plays out the receiver. 

I've made the same change (wish I'd seen this thread first). Any reason why this might be a bad idea?