From abf2bf8c39ca4b433e5c4338ca11b600907bd981 Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Tue, 20 Oct 2015 17:50:24 +0300 Subject: [PATCH] iOS. Executing a part of TurnSound functionality even if TurnSound is not available. --- .../NavigationDashboard/Sound/MWMTextToSpeech.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm index 7af23d7305..a727b36eca 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm @@ -128,9 +128,6 @@ extern NSString * const kMwmTextToSpeechDisable = @"MWMTEXTTOSPEECH_DISABLE"; - (void)playTurnNotifications { - if (![self isValid]) - return; - Framework & frm = GetFramework(); if (!frm.IsRoutingActive()) return; @@ -138,6 +135,9 @@ extern NSString * const kMwmTextToSpeechDisable = @"MWMTEXTTOSPEECH_DISABLE"; vector notifications; frm.GenerateTurnSound(notifications); + if (![self isValid]) + return; + for (auto const & text : notifications) [self speakOneString:@(text.c_str())]; }