Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bugs
  • Category User Interface → Themes
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by bertrik - 2008-04-20
Last edited by nicolas_p - 2008-04-20

FS#8914 - WPS %mp tag inconsistency

The 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;
Closed by  nicolas_p
2008-04-20 20:07
Reason for closing:  Fixed
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Thanks!

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing