-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
CachingReader: Reduce log spam for corrupt files #652
CachingReader: Reduce log spam for corrupt files #652
Conversation
start/end = inclusive/exclusive first/last = inclusive/inclusive
// forward it makes sense to keep in memory, the hinter can provide | ||
// either 0 for a forward hint or -1 for a backward hint. We should | ||
// be calculating an appropriate number of samples to go backward as | ||
// some function of the latency, but for now just leave this as a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some time ago we have changed the wording from "latency" to "audio buffer".
Did you mean here: "as some function of the selected audio buffer in hardware preferences?"
I can confirm that the log spam is reduced playing the faulty files from However now I have files that won't end. They are stucked just before the and with schakin waveforms This file also prevent AutoDJ form continuing. |
Thanks for finding another edge case, Daniel 👍 |
My last commit should fix this. Now the requested read buffer is simply On 07/20/2015 05:09 PM, Daniel Schürmann wrote:
|
Issue fixed. However I found crasher:
|
We have already fixed this one some time ago. The current master (just did a Debug [Main]: WCoverArt::slotCoverFound WCoverArt(0x4bee4d0) On 07/21/2015 08:47 AM, Daniel Schürmann wrote:
|
2015-06-30 Merge pull request #626 from Fix outstanding SoundSource issues On 07/21/2015 11:54 AM, Uwe Klotz wrote:
|
My test result was generated by this PR merged to the current master. |
Ah, sorry for the false alarm, I have missed to use the recent m4a plugin from gdb. |
...to trigger a Travis CI rebuild after a strange test failure ;)
There is a bug in the preroll calculation that causes segmentation faults during the tests. Fix will follow. |
|
||
SINT frameIndex = samples2frames(sample); | ||
SINT numFrames = samples2frames(numSamples); | ||
|
||
// TODO: is it possible to move this code out of caching reader | ||
// and into enginebuffer? It doesn't quite make sense here, although | ||
// it makes preroll completely transparent to the rest of the code | ||
// if we're in preroll... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not the first time I am struggling with this comment. I like the current solution, because it simplifies the code elsewhere. If you think the same, we should remove this comment.
DEBUG_ASSERT(nullptr == m_pPrev); | ||
|
||
m_pNext = pBefore; | ||
if (pBefore) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can also be an assertion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To insert an element at the head of the queue you need to pass a pointer to
the head pHead == pBefore. If the list is currently empty there is no head
and consequently pHead == pBefore == nullptr. If we add an assertion the
caller would be responsible to check for emptiness before calling this
function. I prefer to handle the special case of an empty list inside this
function.
On 07/27/2015 01:49 PM, Daniel Schürmann wrote:
In src/cachingreaderchunk.cpp
#652 (comment):
- m_state = READY;
+}
+void CachingReaderChunk::free() {
- DEBUG_ASSERT(READ_PENDING != m_state);
- CachingReaderChunkWorker::init(kDefaultIndex);
- m_state = FREE;
+}
+void CachingReaderChunk::insertIntoListBefore(
CachingReaderChunk\* pBefore) {
- DEBUG_ASSERT(nullptr == m_pNext);
- DEBUG_ASSERT(nullptr == m_pPrev);
- m_pNext = pBefore;
- if (pBefore) {
I think this can also be an assertion.
—
Reply to this email directly or view it on GitHub
https://github.com/mixxxdj/mixxx/pull/652/files#r35527619.
} | ||
|
||
// The state is controlled by the cache as the owner of each chunk! | ||
void giveToWorker() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! :-)
Sorry, the CachingReaderChunk split still not works for me. For example: CachingReaderChunkForWorker::indexForFrame is accessed from cachingReader. In the current state it looks more confusing than helpful to me. A better solution may look like this, using two friend Keys: Since the surrounding code is (thanks to all the refactoring and comments) pretty clear now, By the way: The rest looks good to me. Thank you very much. |
I didn't take the static functions and constants in the base class into I will split the chunk into 3 classes:
On 07/28/2015 10:27 AM, Daniel Schürmann wrote:
|
Ups, no, 3 classes don't work without further complications. The following
On 07/28/2015 10:45 AM, Uwe Klotz wrote:
|
OK, this will work for me as well. |
LGTM Ready to merge? |
Ready. Further improvements can be done later. |
Fine :-) Thank you for another nice PR. |
CachingReader: Reduce log spam for corrupt files
Thanks for the review, Daniel! Always a pleasure :) On 07/28/2015 10:38 PM, Daniel Schürmann wrote:
|
Partially fixes (decoding errors at the end of a file): https://bugs.launchpad.net/mixxx/+bug/1470010