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:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Audio pauses and WPS lag?
« previous next »
  • Print
Pages: [1]

Author Topic: Audio pauses and WPS lag?  (Read 4440 times)

Offline epithetless

  • Member
  • *
  • Posts: 195
    • Dour Times
Audio pauses and WPS lag?
« on: May 10, 2009, 10:40:26 PM »
Having updated my Sansa e280 from build r20834 to the most recent JPEG-album-art-enabled builds (specifically r20875, r20902, and r20907), I'm finding that audio playback occasionally pauses for a moment after selecting a new song from the file browser, when the buffer is loading. At the same time, the current track time displayed in the WPS momentarily remains static. This seems to happen with themes that display album art (cabbiev2 or BlacknBlue_Glass, for instance), but not ones that don't (e.g. Rockboxed or iCatcher). Has anyone else encountered this?

I have album art stored as "folder.jpg" files in my directories (typically at 500x500 or 600x600 pixel resolutions), but I don't know if that has anything to do with it. When I switch back to r20834, the problem disappears...
Logged
Rockboxed: Apple iPod 3G â€¢ Apple iPod nano 2G • iriver H120 • Sansa c250 v1 • Sansa Clip v1 • Sansa Clip v2 • Sansa Clip+ • Sansa e280 v1 • Sansa e280v2 • Sansa Fuze v1  |  non-Rockboxed: HTC Incredible [Android 2.2] • Sansa Fuze v2

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: Audio pauses and WPS lag?
« Reply #1 on: May 11, 2009, 03:00:47 AM »
its probblay expected that .jpg AA is going to take longer than .bmp AA to display... for bmp it only has to scale to fit... for .jpg it has to decompress it first
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline froggyman

  • Member
  • *
  • Posts: 214
Re: Audio pauses and WPS lag?
« Reply #2 on: May 11, 2009, 09:17:07 AM »
would an increased anti-skip buffer help?
Logged
iPod Video 5.5G 30GB - Now Dead :(
Sansa Fuzev2 4GB

"To prevent this day from getting worse, I'll just read ERROR as GOOD THING"

Offline GodEater

  • Member
  • *
  • Posts: 2829
Re: Audio pauses and WPS lag?
« Reply #3 on: May 11, 2009, 09:23:24 AM »
No - it would actually likely make it worse, since there'd be MORE hard drive activity.
Logged

Read The Manual Please

Offline epithetless

  • Member
  • *
  • Posts: 195
    • Dour Times
Re: Audio pauses and WPS lag?
« Reply #4 on: May 11, 2009, 11:05:03 AM »
Quote from: JdGordon on May 11, 2009, 03:00:47 AM
its probblay expected that .jpg AA is going to take longer than .bmp AA to display... for bmp it only has to scale to fit... for .jpg it has to decompress it first

That makes sense. I'll try removing the "folder.jpg" from one of the directories where this happens repeatedly to see if that makes a difference. If not, I'll look into removing the album art coding from the BlacknBlue_Glass WPS, since I actually prefer seeing the extra information it displays.

The thing is, album art is already displayed on the WPS before the audio pauses and playing time lags occur...so I would assume at that point that any JPEG decompression and resizing routines would be done. Is that not the case?

On a different note, would a smaller-sized JPEG take less time/processing power to decompress?
« Last Edit: May 11, 2009, 11:11:56 AM by epithetless »
Logged
Rockboxed: Apple iPod 3G â€¢ Apple iPod nano 2G • iriver H120 • Sansa c250 v1 • Sansa Clip v1 • Sansa Clip v2 • Sansa Clip+ • Sansa e280 v1 • Sansa e280v2 • Sansa Fuze v1  |  non-Rockboxed: HTC Incredible [Android 2.2] • Sansa Fuze v2

Offline Lear

  • Developer
  • Member
  • *
  • Posts: 533
Re: Audio pauses and WPS lag?
« Reply #5 on: May 11, 2009, 04:06:08 PM »
Quote from: epithetless on May 11, 2009, 11:05:03 AM
The thing is, album art is already displayed on the WPS before the audio pauses and playing time lags occur...so I would assume at that point that any JPEG decompression and resizing routines would be done. Is that not the case?

No, it loads new album art for each track. (Though it ought to be possible to check if it has already been decoded and if so, just copy it.)

Quote
On a different note, would a smaller-sized JPEG take less time/processing power to decompress?

Certainly. But even a bigger file shouldn't cause dropouts like that, I think. Seems like a few more yields() in the code would be in order.
Logged

Offline epithetless

  • Member
  • *
  • Posts: 195
    • Dour Times
Re: Audio pauses and WPS lag?
« Reply #6 on: May 11, 2009, 09:16:59 PM »
Quote from: Lear on May 11, 2009, 04:06:08 PM
Quote from: epithetless on May 11, 2009, 11:05:03 AM
The thing is, album art is already displayed on the WPS before the audio pauses and playing time lags occur...so I would assume at that point that any JPEG decompression and resizing routines would be done. Is that not the case?

No, it loads new album art for each track. (Though it ought to be possible to check if it has already been decoded and if so, just copy it.)

Yes, but when I'm seeing this problem occur, the album art has already loaded for the particular track I've just selected from the file browser (i.e. it's not the previous track's album art). Things go like this:

- I click on an MP3 from the file browser.
- The screen goes to the WPS, thinks for a brief moment, shows the album art and tag information, and the song starts playing.
- The current track time display stops at 0:01 (the remaining track time also stops) while the song continues to play for a couple of seconds.
- The audio cuts out, and the current and remaining track time displays disappear for a fraction of a second.
- The current track time display reappears at 0:03 or 0:04 (the correct track time), and the audio resumes. The remaining track time display also reappears with the correct time.

It doesn't happen with all (or even most) of my music, but it does consistently happen with certain tracks (meaning I can reproduce it with those tracks every time). For every other track, however, I've noticed that the current and remaining track time displays do blink off for a brief moment within the first few seconds of the song. The problem detailed above, when it occurs with offending songs, appears to be a protraction of whatever causes this blink. Perhaps that might help someone pinpoint a cause...

I did, by the way, manage to completely eliminate the issue (including the relatively minor track time blink) with BlacknBlue_Glass by removing all the album art coding from the theme, so it does seem to somehow be related to the calling/displaying of album art.
Logged
Rockboxed: Apple iPod 3G â€¢ Apple iPod nano 2G • iriver H120 • Sansa c250 v1 • Sansa Clip v1 • Sansa Clip v2 • Sansa Clip+ • Sansa e280 v1 • Sansa e280v2 • Sansa Fuze v1  |  non-Rockboxed: HTC Incredible [Android 2.2] • Sansa Fuze v2

Offline yapper

  • Rockbox Expert
  • Member
  • *
  • Posts: 794
Re: Audio pauses and WPS lag?
« Reply #7 on: May 11, 2009, 09:33:18 PM »
Can you post one of your problem tracks somewhere? I haven't seen any of the issues you described.
Logged
G2 iPod 20GB / Sansa c240 v1 + 2GB microSD / Sansa c250 v1 / Sansa e250 v1 + 8GB microSDHC / Sansa Fuze v2 + 32GB microSDHC

Offline Lear

  • Developer
  • Member
  • *
  • Posts: 533
Re: Audio pauses and WPS lag?
« Reply #8 on: May 12, 2009, 01:16:56 AM »
Quote from: epithetless on May 11, 2009, 09:16:59 PM
Yes, but when I'm seeing this problem occur, the album art has already loaded for the particular track I've just selected from the file browser (i.e. it's not the previous track's album art).

Rockbox continues to buffer tracks after starting playback, so it will load album art for the buffered tracks (if the WPS uses album art).

Quote
It doesn't happen with all (or even most) of my music, but it does consistently happen with certain tracks (meaning I can reproduce it with those tracks every time). For every other track, however, I've noticed that the current and remaining track time displays do blink off for a brief moment within the first few seconds of the song. The problem detailed above, when it occurs with offending songs, appears to be a protraction of whatever causes this blink. Perhaps that might help someone pinpoint a cause...

Maybe the tracks where it happens have larger album art files?
Logged

Offline pondlife

  • Developer
  • Member
  • *
  • Posts: 248
Re: Audio pauses and WPS lag?
« Reply #9 on: May 12, 2009, 05:47:36 AM »
Does this mean that the same folder.jpg is actually bufffered/stored for eavh track in a folder?

Ideally, this should be handled internally by buffering.c (i.e. don't reload a file section that's already in memory).

pondlife
Logged

Offline Lear

  • Developer
  • Member
  • *
  • Posts: 533
Re: Audio pauses and WPS lag?
« Reply #10 on: May 12, 2009, 06:32:18 AM »
Quote from: pondlife on May 12, 2009, 05:47:36 AM
Does this mean that the same folder.jpg is actually bufffered/stored for eavh track in a folder?

Ideally, this should be handled internally by buffering.c (i.e. don't reload a file section that's already in memory).

Yes (on both accounts). It doesn't seem that difficult, for album art at least, to locate any previous handle and copy the data...

Still, more yields are probably needed to handle shuffled playback without dropouts.
Logged

Offline MilitantlyUnhelpful

  • Developer
  • Member
  • *
  • Posts: 4
Re: Audio pauses and WPS lag?
« Reply #11 on: May 14, 2009, 08:23:37 PM »
This turned out to be a lock contention issue. It should be resolved in r20932, please let me know if there are still problems with it. Stalls might still happen at the end of a track, if the next track is not finished loading its cover art yet, as this happens before the track's audio data is buffered.
Logged
 

Offline epithetless

  • Member
  • *
  • Posts: 195
    • Dour Times
Re: Audio pauses and WPS lag?
« Reply #12 on: May 27, 2009, 12:28:39 AM »
Just wanted to report back that r20932 looks to have fixed the audio dropouts and WPS lag. Thanks, MilitantlyUnhelpful!
Logged
Rockboxed: Apple iPod 3G â€¢ Apple iPod nano 2G • iriver H120 • Sansa c250 v1 • Sansa Clip v1 • Sansa Clip v2 • Sansa Clip+ • Sansa e280 v1 • Sansa e280v2 • Sansa Fuze v1  |  non-Rockboxed: HTC Incredible [Android 2.2] • Sansa Fuze v2

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Audio pauses and WPS lag?
 

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

Page created in 0.12 seconds with 15 queries.