Audio dropouts on lossless/uncompressed formats

Bug #1000907 reported by Sean M. Pappalardo
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Medium
Unassigned
1.10
Won't Fix
Medium
Unassigned
1.11
Won't Fix
Medium
Unassigned

Bug Description

When playing a FLAC, WAV, or AIFF file, it seems like CachingReader is sometimes waiting until it's out of data before requesting it from the disk, causing an audible dropout with a number (usually 6) of lines printing to the console like:

Debug []: Couldn't get chunk 1019 in read() of [ 16706494 , 16706964 ] chunks 1019 - 1019

It happens every so often while just playing through a track. More lines print the faster the track is played. (One particularly bad case was playing at +80%, it missed 6 chunks in a row.) This console output coincides with the access light on my disk.

This doesn't happen every time it needs data, unless the disk just sometimes happens to be fast enough to meet the deadline. If I play through the track again, the problem doesn't occur. (Suspect system cache helping out here.)

Tested on an HP EliteBook 8440p:
- Intel Core i5 M520 2.4GHz
- 2GB RAM, 95MB free with Mixxx, JACK, and FIrefox running
- Debian Squeeze
- Mixxx trunk r3166 (pre-1.11.0,) happens in 1.10 branch as well
- Music files on external 500GB RAID-1 drive connected via eSATA with XFS file system, just under 73MB/s read speed according to hdparm. (Cached reads are ~2500MB/s.)

description: updated
description: updated
Revision history for this message
mutil (mutil) wrote :

Is this anyhow related to lp:925616 ?
I get tons of these "Couldn't get chunk" debug messages from caching reader (for every file format), before it crashes.

Revision history for this message
Sven Killig (sven-killig) wrote :

Importance: "Medium"? A show stopper, I'd say.
Can I help somehow by compiling and testing it with different compile time #define-s ?

Revision history for this message
Sven Killig (sven-killig) wrote :

#define CHUNK_LENGTH 65536
//#define CHUNK_LENGTH 524288

looks promising. Is it worth trying?

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Hi Sven,

It's only marked medium because it's very unclear how broadly this affects people. I can't reproduce it myself.

That CHUNK_LENGTH define changes the granularity at which Mixxx can cache decoded sections of audio. I don't think it will have much of an effect on the problem but give it a try if you're curious!

FYI it's often very normal to see 'couldn't get chunk' in your log. If I had to guess this bug has very little to do with CachingReader and more to do with the decoding code since CachingReader doesn't do anything special based on the format of the audio.

If it's simply the case that the decoding library is taking too long to decode then that would make sense for FLAC since it has to do more work decompressing the audio but it doesn't make sense at all for WAV since that's stored uncompressed on disk so there's very little work to do.

Honestly, I just assumed this is Sean's RAID array being super flaky but now that other people can reproduce it I guess that's not the case ;).

Sven, mutil : Are you absolutely sure this only happens when using FLAC/WAV/AIFF and not MP3? If you can ever reproduce this with MP3 then this is not the bug you're seeing and it's likely your latency is just slightly too low or something.

Revision history for this message
mutil (mutil) wrote :

Hey Ryan,
No, for me this did not happen only with FLAC/WAV, I think it glitched with every file type I used, but maybe a little more with these formats. Probably a different bug, related to the CPU shortage of a netbook.

RJ Skerry-Ryan (rryan)
Changed in mixxx:
milestone: 1.11.0 → none
Changed in mixxx:
assignee: nobody → Uwe Klotz (uklotzde)
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

I remember that I've seen similar log messages in Mixxx versions prior to 1.12. After refactoring both the SoundSource API and CachingReader(Worker) in branch master I don't experience any of those messages. Should be fixed for future releases >1.12.

Still relevant for 1.12?

Revision history for this message
Owen Williams (ywwg) wrote :

It's not feasible to make soundsource fixes for 1.12, unfortunately. Better to push 1.12 out and follow up with the next release to get these edge cases addressed.

Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

- Won't fix for 1.12
- Fixed on master = current development branch

Changed in mixxx:
status: Confirmed → Fix Committed
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

I will mark the 1.11 target of this bug as Invalid, because Won't Fix is not available.

RJ Skerry-Ryan (rryan)
Changed in mixxx:
milestone: none → 2.1.0
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/6459

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.