From 45f6239b508ed69a76421b7d890c9dbfce02c794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20W=C3=BCthrich?= Date: Sun, 19 May 2024 18:08:32 -0600 Subject: [PATCH] [ios] Interrupt podcasts instead of duck them during TTS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use AVAudioSessionCategoryOptionInterruptSpokenAudioAndMixWithOthers to interrupt spoken content during TTS. Signed-off-by: Fabian Wüthrich --- iphone/Maps/Core/TextToSpeech/MWMTextToSpeech.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iphone/Maps/Core/TextToSpeech/MWMTextToSpeech.mm b/iphone/Maps/Core/TextToSpeech/MWMTextToSpeech.mm index 44ff8f9244..25beda5598 100644 --- a/iphone/Maps/Core/TextToSpeech/MWMTextToSpeech.mm +++ b/iphone/Maps/Core/TextToSpeech/MWMTextToSpeech.mm @@ -247,7 +247,9 @@ using Observers = NSHashTable; } if (![[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback mode:mode - options:AVAudioSessionCategoryOptionMixWithOthers | AVAudioSessionCategoryOptionDuckOthers + options: + AVAudioSessionCategoryOptionInterruptSpokenAudioAndMixWithOthers | + AVAudioSessionCategoryOptionDuckOthers error:nil] || ![[AVAudioSession sharedInstance] setActive:YES error:nil]) return;