mirror of https://github.com/encounter/SDL.git
Fixed Bluetooth audio output on Apple TV
This commit is contained in:
parent
cced5eb937
commit
ff53521bc6
|
@ -406,11 +406,14 @@ static BOOL update_audio_session(_THIS, SDL_bool open, SDL_bool allow_playandrec
|
||||||
if (category == AVAudioSessionCategoryPlayAndRecord) {
|
if (category == AVAudioSessionCategoryPlayAndRecord) {
|
||||||
options |= AVAudioSessionCategoryOptionDefaultToSpeaker;
|
options |= AVAudioSessionCategoryOptionDefaultToSpeaker;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (category == AVAudioSessionCategoryRecord ||
|
if (category == AVAudioSessionCategoryRecord ||
|
||||||
category == AVAudioSessionCategoryPlayAndRecord) {
|
category == AVAudioSessionCategoryPlayAndRecord) {
|
||||||
options |= AVAudioSessionCategoryOptionAllowBluetooth;
|
/* AVAudioSessionCategoryOptionAllowBluetooth isn't available in the SDK for
|
||||||
|
Apple TV but is still needed in order to output to Bluetooth devices.
|
||||||
|
*/
|
||||||
|
options |= 0x4; /* AVAudioSessionCategoryOptionAllowBluetooth; */
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (category == AVAudioSessionCategoryPlayAndRecord) {
|
if (category == AVAudioSessionCategoryPlayAndRecord) {
|
||||||
options |= AVAudioSessionCategoryOptionAllowBluetoothA2DP |
|
options |= AVAudioSessionCategoryOptionAllowBluetoothA2DP |
|
||||||
AVAudioSessionCategoryOptionAllowAirPlay;
|
AVAudioSessionCategoryOptionAllowAirPlay;
|
||||||
|
|
Loading…
Reference in New Issue