Skip to content

Commit

Permalink
Avoid debug prints in the audio callback
Browse files Browse the repository at this point in the history
Since this is an interrupt, the CDC code will hang if nothing is reading
  • Loading branch information
Daft-Freak committed Nov 20, 2020
1 parent 759c89b commit b36d4a9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions avi-file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,8 @@ void AVIFile::audioCallback()
{
if(dataSize[curAudioBuf])
{
// recover from underrun
endSample = audioBuf[curAudioBuf] + dataSize[curAudioBuf];
blit::debug("recovered\n");
}
else
{
Expand Down Expand Up @@ -477,8 +477,9 @@ void AVIFile::audioCallback()
{
currentSample = audioBuf[curAudioBuf];
endSample = currentSample + dataSize[curAudioBuf];
if(currentSample == endSample)
blit::debug("underrun!\n");

// if(currentSample == endSample)
// no more samples available - underrun
}
}

Expand Down

0 comments on commit b36d4a9

Please sign in to comment.