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

iOS: Enable AirPlay

This commit is contained in:
Tom Poole 2023-09-15 15:48:03 +01:00
parent ae805ffe3f
commit 856aeaeeb1

View file

@ -284,7 +284,7 @@ struct iOSAudioIODevice::Pimpl : public AsyncUpdater
static void setAudioSessionCategory (NSString* category)
{
NSUInteger options = 0;
NSUInteger options = AVAudioSessionCategoryOptionAllowAirPlay;
#if ! JUCE_DISABLE_AUDIO_MIXING_WITH_OTHER_APPS
options |= AVAudioSessionCategoryOptionMixWithOthers; // Alternatively AVAudioSessionCategoryOptionDuckOthers
@ -292,8 +292,8 @@ struct iOSAudioIODevice::Pimpl : public AsyncUpdater
if (category == AVAudioSessionCategoryPlayAndRecord)
{
options |= (AVAudioSessionCategoryOptionDefaultToSpeaker
| AVAudioSessionCategoryOptionAllowBluetooth);
options |= AVAudioSessionCategoryOptionDefaultToSpeaker
| AVAudioSessionCategoryOptionAllowBluetooth;
if (@available (iOS 10.0, *))
options |= AVAudioSessionCategoryOptionAllowBluetoothA2DP;
@ -789,9 +789,9 @@ struct iOSAudioIODevice::Pimpl : public AsyncUpdater
switch (reason)
{
case AVAudioSessionRouteChangeReasonCategoryChange:
case AVAudioSessionRouteChangeReasonOverride:
case AVAudioSessionRouteChangeReasonRouteConfigurationChange:
break;
case AVAudioSessionRouteChangeReasonOverride:
case AVAudioSessionRouteChangeReasonUnknown:
case AVAudioSessionRouteChangeReasonNewDeviceAvailable:
case AVAudioSessionRouteChangeReasonOldDeviceUnavailable: