1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

macOS/iOS: Fix setting the AirPlay audio session category

This commit is contained in:
Ian Clarkson 2023-10-25 23:28:10 -07:00 committed by Tom Poole
parent ba47cac264
commit e2eb4aec94

View file

@ -276,7 +276,7 @@ struct iOSAudioIODevice::Pimpl final : public AsyncUpdater
static void setAudioSessionCategory (NSString* category)
{
NSUInteger options = AVAudioSessionCategoryOptionAllowAirPlay;
NSUInteger options = 0;
#if ! JUCE_DISABLE_AUDIO_MIXING_WITH_OTHER_APPS
options |= AVAudioSessionCategoryOptionMixWithOthers; // Alternatively AVAudioSessionCategoryOptionDuckOthers
@ -285,7 +285,8 @@ struct iOSAudioIODevice::Pimpl final : public AsyncUpdater
if (category == AVAudioSessionCategoryPlayAndRecord)
{
options |= AVAudioSessionCategoryOptionDefaultToSpeaker
| AVAudioSessionCategoryOptionAllowBluetooth;
| AVAudioSessionCategoryOptionAllowBluetooth
| AVAudioSessionCategoryOptionAllowAirPlay;
if (@available (iOS 10.0, *))
options |= AVAudioSessionCategoryOptionAllowBluetoothA2DP;