Skip to content

Commit

Permalink
iOS: Enable AirPlay
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoole committed Sep 15, 2023
1 parent ae805ff commit 856aeae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/juce_audio_devices/native/juce_Audio_ios.cpp
Expand Up @@ -284,16 +284,16 @@ 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
#endif

if (category == AVAudioSessionCategoryPlayAndRecord)
{
options |= (AVAudioSessionCategoryOptionDefaultToSpeaker
| AVAudioSessionCategoryOptionAllowBluetooth);
options |= AVAudioSessionCategoryOptionDefaultToSpeaker
| AVAudioSessionCategoryOptionAllowBluetooth;

if (@available (iOS 10.0, *))
options |= AVAudioSessionCategoryOptionAllowBluetoothA2DP;
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 856aeae

Please sign in to comment.