mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
macOS/iOS: Suppress and fix unguarded availability warnings
This commit is contained in:
parent
1658d3f9ab
commit
291f88abb2
3 changed files with 109 additions and 97 deletions
|
|
@ -288,9 +288,15 @@ struct iOSAudioIODevice::Pimpl : public AudioPlayHead,
|
|||
#endif
|
||||
|
||||
if (category == AVAudioSessionCategoryPlayAndRecord)
|
||||
{
|
||||
options |= (AVAudioSessionCategoryOptionDefaultToSpeaker
|
||||
| AVAudioSessionCategoryOptionAllowBluetooth
|
||||
| AVAudioSessionCategoryOptionAllowBluetoothA2DP);
|
||||
| AVAudioSessionCategoryOptionAllowBluetooth);
|
||||
|
||||
#if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
|
||||
if (@available (iOS 10.0, *))
|
||||
options |= AVAudioSessionCategoryOptionAllowBluetoothA2DP;
|
||||
#endif
|
||||
}
|
||||
|
||||
JUCE_NSERROR_CHECK ([[AVAudioSession sharedInstance] setCategory: category
|
||||
withOptions: options
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue