Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Music playback
  • Assigned To
    nicolas_p
  • 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 - 2007-11-06
Last edited by nicolas_p - 2007-11-19

FS#8104 - playback.c consistency and track count

I noticed that track_widx and track_ridx in playback.c are not always updated in the same way (with the wrap-around). Patch playback1.txt corrects this and should have no functional impact.

Patch playback2.txt goes a bit further. It simplifies functions audio_have_tracks, audio_have_free_tracks and audio_track_count by using just the track_widx and track_ridx pointers to determine how much of the track buffer is used/free. This clears up a few ‘ifs’ for corner cases and replaces it by a simpler unconditional calculation.
This new implementation is not 100% identical to the original implementation as the exact intention of the original functions was not completely clear to me.

Closed by  nicolas_p
2007-11-19 16:38
Reason for closing:  Accepted
Additional comments about closing:  

Thanks!

Thanks! I’ll look into those ASAP.
Reading “the exact intention of the original functions was not completely clear to me” made me smile, because I had the exact same problem and it’s why I didn’t touch these parts of the code ;)

If anyone claims to know what those functions do, can we have lots of comments added please ;).

FWIW, re-diffed against 15597.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing