I want my app to be able to play sounds via AirPlay on iOS devices. To do that I need to specify the session category options to include “AVAudioSessionCategoryOptionAllowAirPlay”.
The only way I have (so far) found to do that is to rewrite the Pimpl::Open(…) member in modules/juce_audio_devices/native/juce_ios_Audio.cpp, and set the category and option to waht I want, ( that is
NSString* category = AVAudioSessionCategoryPlayAndRecord;
and
NSUInteger options = (AVAudioSessionCategoryOptionMixWithOthers | AVAudioSessionCategoryOptionAllowAirPlay | AVAudioSessionCategoryOptionAllowBluetooth);
Rewriting juce modules source code is not good (your changes tend to vanish e.g. when JUCE is updated etc.).
Is there a right/smarter way to set the AVAudioSession Category and Options ?
–
Eigil
