Rockbox

Tasklist

FS#6117 - File buffering failure results in white noise/position confusion

Attached to Project: Rockbox
Opened by Steve Bavin (pondlife) - Wednesday, 04 October 2006, 16:58 GMT
Last edited by Steve Bavin (pondlife) - Wednesday, 04 October 2006, 17:08 GMT
Task Type Bugs
Category Music playback
Status Closed
Assigned To No-one
Operating System All players
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

From the forum, posts by woodensoul (http://forums.rockbox.org/index.php?topic=6739):

"Sometimes a song won't finish and jump right into the next one. Sometimes a song will repeat when repeat is set to 'off'. Nearly every time I play the first track in a directory, playback stops after the first track is finished instead of playing the next track in the playlist like it should. I even got a loud distorted noise while the player incorrectly changed tracks."

"I was able to reproduce all the bugs I mentioned in my first post using the bleeding edge build from 9.28. The only setting I changed was to set Repeat to 'Off'.
Play a track in a directory. Wait until the directory is finished playing and playback stops. (You could probably skip forward to the end of the directory and wait for that track to finish.) Navigate to another directory and play the first track. Instead of playing the next track in the directory after playback for the first finishes, as it should be, playback stops after the first track. If you play the second track now, playback seems to continue correctly until (possibly the buffer runs out as mhebsacker mentioned) some loud static or white noise comes in the middle of a track and then the track repeats and finishes, then proceeds to play the next track without the track title changing to reflect the new track and the elapsed time continuing past the duration of the previously played track. i.e. (7:15/5:34). The elapsed time just continues to go up until you force the player to re-buffer the song.
The white noise/static thing doesn't happen every time but did happen a few times in 7 hours of listening last night. Playback stopping after the first track in a directory happened several times."

Note that I (pondlife) haven't actually been able to reproduce this problem, although have heard white noise in the past. PaulJam has also had it fail on the simulator, but not reliably.

I'm opening this bug report in hope that someone will come up with a reliable method to make it fail every time on my device (or even better on the simulator) as this needs fixing before I forget how the playback code works ;-)
This task depends upon

Closed by  Steve Bavin (pondlife)
Monday, 06 November 2006, 07:18 GMT
Reason for closing:  Fixed
Additional comments about closing:  Was resolved by lowlight\'s fixes at the end of October.
Comment by Steve Bavin (pondlife) - Wednesday, 04 October 2006, 17:02 GMT
I have noticed a problem with playback where the filebufused can go negative after playback reaches a natural stop (actually it becomes a large number as it's of type size_t). I've put some tests in to prevent this and made a test build for the H120, which is available for a short time from:

http://pondlife.homeip.net/images/rockboxH120.zip

Please report back if you get a chance to try this out. Or if you can find another recipe that makes this fail reliably.
Comment by Steve Bavin (pondlife) - Wednesday, 04 October 2006, 17:22 GMT
Another report from the MisticRiver forum (http://misticriver.net/showpost.php?p=501915):

"hey guys i think i figured out wats causing the player to make those funny noises in the middle of playin well try these settings this is the cause i guess:
1.crossfade settings -always ,fadeout duration- 10secs, fadeout mode- mix
2.try loading tagcache to ram & update on restart "on"
3.then try shutting ur player m restart it n immediately try to press pause button so that it resumes playback then start clickin next continously for 2-5 tracks n this problem occurs"

I'll give it a go...!
Comment by Steve Bavin (pondlife) - Wednesday, 04 October 2006, 19:57 GMT
Nope. Tried all that many times "n" each time it carried on happily.
Comment by Jeremy Cayot (woodensoul) - Thursday, 05 October 2006, 16:43 GMT
I tried your test build briefly. I was able to reproduce the bug that causes playback to stop after the first track in a directory.

To reproduce:
Turn Repeat off.
Play a directory (allowing Rockbox to generate the playlist).
Let the directory finish the last track, playback stops.
Navigate to another directory and select the first (or possibly other) track in the directory for playback.
The track then plays and playback stops after finishing the track instead of continuing on to the next track as it should.

I will continue to test and report back.
Comment by Franz Nieroster (nieroster) - Thursday, 05 October 2006, 17:38 GMT
Hi Steve,

I tried your build and guess what: nothing has changed for me! I was playing 192kbit/s mp3 files from a directory (dynamic playlist) for about 15 minutes and pffffffft it skipped back in the middle of a track.
Comment by Jeremy Cayot (woodensoul) - Sunday, 08 October 2006, 11:44 GMT
I've done some testing and it appears that the bug causing playback to stop after playing the first track in a directory does not occur in the build from 2006.09.17 or before, but does occur in builds from 2006.09.20 and later and still occurs in the most recent CVS builds. I do not have builds from the 17th to the 20th so I can't test any further to narrow it down. This bug does not occur unless the player is first allowed to finish a directory, hence repeat must be set to "off".

Some more information on the related bugs:
The white noise/repeating of current track does not seem to occur at all unless the player is allowed to finish a directory. I have been testing by queuing up several albums in a playlist and I don't get the white noise/confused playback problem at all.

Also, the bug occurs with ID3 database or filetree fileview. I will also post these findings on the bug report.

Possible villainous changes...?

18 Sep 20:47 Hardeep Sidhu apps/playlist.c 1.172 Fixed problem with first_index being incorrectly updated when prepending tracks. Fixes example 1 in B#6005.
18 S
Comment by Steve Bavin (pondlife) - Tuesday, 10 October 2006, 07:41 GMT
Hi Jeremy,

Could you try something for me: Make up a playlist for the first album (just a straight run-through). Play the album using that playlist to completion. Then play a second album in the usual way. I expect the bug will still occur, but would like confirmation.

Then try making up a playlist for album 2 as well. Go through the same again, using two playlists and see if that helps. I suspect not, but it's worth a shot!

I know this is time-consuming; thanks for your help.
Comment by Steve Bavin (pondlife) - Wednesday, 11 October 2006, 09:27 GMT
One more thing - if you're able to build, you might like to try the patch at http://www.rockbox.org/tracker/task/6119. It's not ready for prime-time yet (see the patch for details), but any testing would be very useful towards resolving this problem.
Comment by Daniel Dorau (danield) - Sunday, 15 October 2006, 22:00 GMT
Hello, today I installed rockbox for the first time on my iriver h340, great experience so far, but I guess I ran into the same playback problems. I didn't found this bug report at first, so I had already started a new one, but I guess the problems are related, so please see also http://www.rockbox.org/tracker/task/6190

I have to add that I also experienced that phenomenon that only the first title of a directory is played, then stops. Because rockbox is totally new to me and I wasn't sure if that was a bug or feature I didn't mention it yet.

After restarting the firmware the strange playback problems didn't occur again, before the problem was quite persistent over different playlists, playing search results, directories, ...
Comment by Mark Arigo (lowlight) - Monday, 30 October 2006, 16:39 GMT
Have the latest changes fixed this bug?
Comment by Daniel Dorau (danield) - Monday, 30 October 2006, 18:32 GMT
Seems so. I have 241006 on my iriver and didn't experience the problems observed by me anymore. (knock on wood)
Comment by JP (salival) - Monday, 30 October 2006, 19:46 GMT
I had the same problem before, now it's gone, only to be replaced with hangs of my h300. (twice today,I had to do a hard reset) I also noticed some occasional (once every 5 - 10 mins) pauses of about half a second during playback.

So my guess is that there are still some buffer issues to be resolved.

I use the filebrowser with auto advancing directory. I will reset my config settings and if it ceases to exist I will post again.
Comment by JP (salival) - Thursday, 02 November 2006, 08:18 GMT
I used a recent, clean cvs (meaning not an old, updated one) and the problem seems to be gone.

Loading...