Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  [Fixed] Resume position sometimes incorrect
« previous next »
  • Print
Pages: [1]

Author Topic: [Fixed] Resume position sometimes incorrect  (Read 3108 times)

Offline keyb_gr

  • Member
  • *
  • Posts: 40
[Fixed] Resume position sometimes incorrect
« on: April 04, 2011, 01:02:06 PM »
(As a PS to my last thread, Buschel's latest patch gave me a chuckle - only recently did I retag a track from +0.00 dB to +0.01 dB to work around the issue it addresses. Some classical-heads are likely to appreciate the change.)

Here's another problem, this time one that I have encountered in Rockbox for as long as I'm using it on a ClipV2 and now a Clip+:

I have a habit of stopping playback in the last few seconds of a track. If I then turn off the player, it happens that playback resumes a good way into the next track.

My (layman's) explanation: At this point, the next track has already been loaded (which it needs to for gapless playback to work), and resume mistakenly saves the playback position of the current track plus the file name of the next one.

FWIW, pretty much all the files on the player are -V 6 to -V 4 MP3s.

So, any comments from those in the know (or code, for that matter)? Is it really like I think it is?
« Last Edit: April 08, 2011, 12:44:45 PM by keyb_gr »
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Resume position sometimes incorrect
« Reply #1 on: April 04, 2011, 01:56:03 PM »
Pausing in the last few seconds of a track and then rebooting resumes at the correct position for me on my Clip+.  Could you be more specific about the steps needed to reproduce this problem?
Logged

Offline keyb_gr

  • Member
  • *
  • Posts: 40
Re: Resume position sometimes incorrect
« Reply #2 on: April 04, 2011, 05:14:58 PM »
OK, I'll give it a shot:

What you need is at least two successive tracks in a playlist, we'll call them track1 and track2, with playtime(track2) > playtime(track1) (preferably at least a 10..20% difference).

Then stop playback within about the last 2 or 3 seconds of track1, e.g. by a short press of the Power button (you don't even need to power down). Hit the Home button and resume playback. You should find that you are well into track2 now.

I'm currently on build 29668. Other features I'm using: scrobbler, replaygain (track gain when shuffling), dithering.
Logged

Offline Buschel

  • Developer
  • Member
  • *
  • Posts: 190
Re: Resume position sometimes incorrect
« Reply #3 on: April 04, 2011, 05:27:25 PM »
The issue can be reproduced as described by keyb_gr.

As assumed the resume issue occurs if you pause playback during a small time window. This window begins when audio_check_new_track() is called and ends when the new track is starting to play. Reason for the issue is that audio_check_new_track() calls playlist_next() which instantly increases the playlist index. The playlist index itself is used to save the resume position. Result: Rockbox will resume the previewed (next) track at the time position of the correct track.

The time window has a duration 3 seconds (1 second for low memory targets). This is set in get_next_required_pcmbuf_size().

Edit: I have created a bug report and a patch that solves this issue (http://www.rockbox.org/tracker/task/12043). The patch will need some reviewing now :)
« Last Edit: April 04, 2011, 06:11:13 PM by Buschel »
Logged
iPod 5.5G 30GB, iPod nano 2G 8GB, 97% MPC and growing...
 

Offline Buschel

  • Developer
  • Member
  • *
  • Posts: 190
Re: Resume position sometimes incorrect
« Reply #4 on: April 06, 2011, 03:13:13 PM »
Fixed on Trunk with r29682.
Logged
iPod 5.5G 30GB, iPod nano 2G 8GB, 97% MPC and growing...
 

Offline keyb_gr

  • Member
  • *
  • Posts: 40
Re: Resume position sometimes incorrect
« Reply #5 on: April 08, 2011, 12:43:47 PM »
r29685 seemed to work fine already, but since I saw that a regression resulting from the patch had to be fixed, r29693 it is for now. Thumbs up!

I have had no stability issues at all with recent builds btw. Even 3.7.1 would still hang once in a while.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  [Fixed] Resume position sometimes incorrect
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.076 seconds with 16 queries.