with each new JUCE update, untill now, I have to hack the JUCE source to get those bleutooth headphones out of the way. Or did I miss some way to avoid this?
In juce_audio_devices / native / juce_ios_audio.cpp
I comment out the bleutooth devices now:
static void setAudioSessionCategory (NSString* category)
{
NSUInteger options = 0;#if ! JUCE_DISABLE_AUDIO_MIXING_WITH_OTHER_APPS
options |= AVAudioSessionCategoryOptionMixWithOthers; // Alternatively AVAudioSessionCategoryOptionDuckOthers
#endif
if (category == AVAudioSessionCategoryPlayAndRecord)
{
options |= (AVAudioSessionCategoryOptionDefaultToSpeaker;
// | AVAudioSessionCategoryOptionAllowBluetooth); **removed by me
// if (@available (iOS 10.0, *)) **removed by me
// options |= AVAudioSessionCategoryOptionAllowBluetoothA2DP;
}
JUCE_NSERROR_CHECK ([[AVAudioSession sharedInstance] setCategory: category
withOptions: options
error: &error]);
}