cachingreader::read returning 0 on error prolongs problems

Bug #1424271 reported by Owen Williams on 2015-02-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Medium
Unassigned

Bug Description

Sometimes cachingreader::read gets a bad call -- like for an odd number of samples or something. However its solution is to return 0 on error, and then that result is passed up to getnextsamples, the play position doesn't increment and then everything falls apart. This has caused numerous bugs over the years to become big party-wrecking "playback stops and I have to eject the track" issues. Somehow we should catch these errors upstream so the enginebuffer can take action -- maybe set a flag and a call like "m_pReader->getError()" either returns NO_ERROR or READ_ERROR or something? And then the enginebuffer could do something like check the current play position or seek to 0 or I don't know what.

Sometimes, it's true, there's nothing to do but return zero (samples-requested is less than 0 for instance). But, like in the case of an odd number of samples, we can do a lot better than nothing.

Owen Williams (ywwg) wrote :
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers