This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Feature requests · Rockbox frontpage
FS#8914 - WPS %mp tag inconsistency
Attached to Project:
Rockbox
Opened by Bertrik Sikken (bertrik) - Sunday, 20 April 2008, 12:02 GMT+2
Last edited by Nicolas Pennequin (nicolas_p) - Sunday, 20 April 2008, 22:07 GMT+2
Opened by Bertrik Sikken (bertrik) - Sunday, 20 April 2008, 12:02 GMT+2
Last edited by Nicolas Pennequin (nicolas_p) - Sunday, 20 April 2008, 22:07 GMT+2
|
DetailsThe WPS %pm tag is described here as having values from 0 to 4:
http://www.rockbox.org/twiki/bin/view/Main/CustomWPS#Playback_Mode but the code assigns a value from 1 to 5 in gwps-common.c line 1105. I think this is a bug. Other remarks: * The \ at the end of the line can be removed safely * Instead of calling audio_status(), it is possible to use the cached value 'status' * if condition (status == AUDIO_STATUS_PLAY) is TRUE, it is useless to check condition !(status & AUDIO_STATUS_PAUSE) since it will always be false. Suggested simplified code: int status = audio_status(); int mode = 0; if (status == AUDIO_STATUS_PLAY) mode = 1; if ((status & AUDIO_STATUS_PAUSE) && (! status_get_ffmode())) mode = 2; if (status_get_ffmode() == STATUS_FASTFORWARD) mode = 3; if (status_get_ffmode() == STATUS_FASTBACKWARD) mode = 4; |
This task depends upon
Closed by Nicolas Pennequin (nicolas_p)
Sunday, 20 April 2008, 22:07 GMT+2
Reason for closing: Fixed
Additional comments about closing: Thanks!
Sunday, 20 April 2008, 22:07 GMT+2
Reason for closing: Fixed
Additional comments about closing: Thanks!