mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
iOS: Fix deprecation warning
This commit is contained in:
parent
6f1d116279
commit
37bb7a6c30
1 changed files with 8 additions and 2 deletions
|
|
@ -371,10 +371,16 @@ struct iOSAudioIODevice::Pimpl final : public AsyncUpdater
|
|||
|
||||
if (category == AVAudioSessionCategoryPlayAndRecord)
|
||||
{
|
||||
#if JUCE_IOS_API_VERSION_CAN_BE_BUILT (26, 0)
|
||||
constexpr auto bluetoothOption = AVAudioSessionCategoryOptionAllowBluetoothHFP;
|
||||
#else
|
||||
constexpr auto bluetoothOption = AVAudioSessionCategoryOptionAllowBluetooth;
|
||||
#endif
|
||||
|
||||
options |= AVAudioSessionCategoryOptionDefaultToSpeaker
|
||||
| AVAudioSessionCategoryOptionAllowBluetooth
|
||||
| AVAudioSessionCategoryOptionAllowAirPlay
|
||||
| AVAudioSessionCategoryOptionAllowBluetoothA2DP;
|
||||
| AVAudioSessionCategoryOptionAllowBluetoothA2DP
|
||||
| bluetoothOption;
|
||||
}
|
||||
|
||||
JUCE_NSERROR_CHECK ([[AVAudioSession sharedInstance] setCategory: category
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue