@@ -85,14 +85,12 @@ open class RouteVoiceController: NSObject, AVSpeechSynthesizerDelegate {
8585
8686 func observeNotifications( by service: NavigationService ) {
8787 NotificationCenter . default. addObserver ( self , selector: #selector( didPassSpokenInstructionPoint ( notification: ) ) , name: . routeControllerDidPassSpokenInstructionPoint, object: service. router)
88- NotificationCenter . default. addObserver ( self , selector: #selector( pauseSpeechAndPlayReroutingDing ( notification: ) ) , name: . routeControllerWillReroute, object: service. router)
8988 NotificationCenter . default. addObserver ( self , selector: #selector( didReroute ( notification: ) ) , name: . routeControllerDidReroute, object: service. router)
9089 NotificationCenter . default. addObserver ( self , selector: #selector( didUpdateSettings ( notification: ) ) , name: . navigationSettingsDidChange, object: nil )
9190 }
9291
9392 func suspendNotifications( ) {
9493 NotificationCenter . default. removeObserver ( self , name: . routeControllerDidPassSpokenInstructionPoint, object: nil )
95- NotificationCenter . default. removeObserver ( self , name: . routeControllerWillReroute, object: nil )
9694 NotificationCenter . default. removeObserver ( self , name: . routeControllerDidReroute, object: nil )
9795 NotificationCenter . default. removeObserver ( self , name: . navigationSettingsDidChange, object: nil )
9896 }
@@ -188,10 +186,7 @@ open class RouteVoiceController: NSObject, AVSpeechSynthesizerDelegate {
188186 public var rerouteSoundPlayer : AVAudioPlayer
189187
190188 @objc func didReroute( notification: NSNotification ) {
191- // Play reroute sound when a faster route is found
192- if notification. userInfo ? [ RouteController . NotificationUserInfoKey. isProactiveKey] as! Bool {
193- pauseSpeechAndPlayReroutingDing ( notification: notification)
194- }
189+ pauseSpeechAndPlayReroutingDing ( notification: notification)
195190 }
196191}
197192
0 commit comments