mapbox-navigation-ios icon indicating copy to clipboard operation
mapbox-navigation-ios copied to clipboard

Voice Controller Stops After Rerouting

Open hastiranjkesh opened this issue 7 years ago • 2 comments

In RouteVoiceController class in pauseSpeechAndPlayReroutingDing method, you stop speechSynth at first and then check if playRerouteSound is true or not. I have a custom Navigation Controller where I set the playRerouteSound variable to false. My voice controller stops after rerouting. I changed the order of the first lines of this method to solve my problem:

@objc func pauseSpeechAndPlayReroutingDing(notification: NSNotification) {
    guard playRerouteSound && !NavigationSettings.shared.voiceMuted else {
        return
    }
    speechSynth.stopSpeaking(at: .word) 
    do {
        try mixAudio()
    } catch {
        voiceControllerDelegate?.voiceController?(self, spokenInstructionsDidFailWith: error)
    }
    rerouteSoundPlayer.play()
}

Mapbox Navigation SDK version:0.26

hastiranjkesh avatar Dec 11 '18 07:12 hastiranjkesh

Thanks for opening an issue. If you have a fix, would you mind opening a pull request?

akitchen avatar Dec 14 '18 03:12 akitchen

A fix for this issue landed in #1903

frederoni avatar May 22 '19 16:05 frederoni