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:
parent
ba47cac264
commit
e2eb4aec94
1 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue