- Status Closed
- Percent Complete
- Task Type Patches
- Category User Interface
- Assigned To No-one
- Operating System All players
- Severity High
- Priority Very Low
- Reported Version
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
Opened by pondlife - 2006-07-21
Last edited by linusnielsen - 2006-07-24
FS#5691 - Fix for crash if stop pressed during voice output
If the user stops playback while a filename is still being spelt, Rockbox locks up. This seems to be because playback.c waits for a Q_VOICE_STOP event (to clear voice_is_playing), but this never occurs. Looking at the changelog, it seems that this loop was added to fix crashes when pressing stop in the tree view. A slightly simpler loop, just waiting for the voice queue to be empty, will do the job and doesn’t loop forever.
This patch also performs a talk_id(VOICE_PAUSE, false) to cause voice output to be truncated faster so that filenames are not spelt out over the first 10 seconds of a track. It would be neater to add a talk_shutup() function to talk.h/talk.c and use this, but I didn’t want to put any dependency on the other talk.c patch I’ve submitted.
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
And here’s the patch!
It would be good if anyone knows whether Q_VOICE_STOP should be occuring in this case. If so,, a better fix would be to find out why it’s not being generated (or handled).
I’ve determined that there’s no Q_VOICE_STOP being produced in this situation (still not sure if this is intentional).
Looking at the logic in playback.c, the loop:
is resulting in an endless loop, as the queue remains empty and nothing is going to post a Q_VOICE_STOP in there.
Maybe this should read
i.e. if we know the queue is empty, don’t hang around waiting for a Q_VOICE_STOP?
This one-line mod is included in the updated patch attached here.