stadiamaps / ferrostar

A FOSS navigation SDK built from the ground up for the future
https://stadiamaps.github.io/ferrostar/
Other
91 stars 11 forks source link

Clear the text-to-speech queue when starting a new navigation session #117

Open ianthetechie opened 2 weeks ago

ianthetechie commented 2 weeks ago

When recalculating in a somewhat rapid loop (ex: driving the wrong direction but routing keeps telling you to start going the opposite way), the text-to-speech queue can pile up as the instructions may take longer to read than the recalculation throttle delay. Once you're going the right direction again, you may still keep getting the same voice prompt.

I believe the issue occurs because the TTS queue isn't cleared. Normally this behavior is correct, but it really should drop the queue and stop playback of the current utterance whenever startNavigaton is invoked.

I noticed this bug on Android. It might affect iOS as well, so worth a check.