Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix outstanding SoundSource issues #626

Merged
merged 11 commits into from
Jun 30, 2015
Merged

Fix outstanding SoundSource issues #626

merged 11 commits into from
Jun 30, 2015

Conversation

uklotzde
Copy link
Contributor

The first commit fixes the violation of an implicit assumption if data from corrupt files can only be read partially.

The remaining commits fix an issue reported by synthor in the forums regarding repeated seek operations in files: http://www.mixxx.org/forums/viewtopic.php?f=1&t=7131&start=70#p24740

I've eliminated the unnecessary seek operations, but the CachingReaderWorker is still reading the same chunk over and over even if the track has been stopped. If this is actually an issue it must be fixed for both 1.12 and master. This does only happen at the end of a corrupt file when less data than expected could be read.

Fixes https://bugs.launchpad.net/mixxx/+bug/1470049

Fixes the following assertion:
DEBUG ASSERT: "0 == (hint.sample % CachingReaderWorker::kChunkChannels)" in file src/cachingreader.cpp, line 492

The calculation of chunk offsets relies on chunks with a constant size.
Only the last chunk might be smaller than all others. The worker now fills
the chunks with silence if the data has been read partially.
Because of reasons I don't know processChunkReadRequest() is called
periodically even while the track is not playing. Unnecessary seek
operations on the SoundSource should be avoided for if the frame index
is out of range or beyond the end of the file.
@daschuer
Copy link
Member

Thank you very much!
LGTM

daschuer added a commit that referenced this pull request Jun 30, 2015
…eking

Fix outstanding SoundSource issues
@daschuer daschuer merged commit c390cba into mixxxdj:master Jun 30, 2015
@uklotzde uklotzde deleted the CachingReaderAvoidUnnecessarySeeking branch July 18, 2015 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants