Core Audio output: Fix crash on playback reaching the end of the playlist

CQTexperiment
Christopher Snowhill 2022-01-18 16:48:37 -08:00
parent 5c0a510848
commit 9085cf18df
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ static OSStatus renderCallback( void *inRefCon, AudioUnitRenderActionFlags *ioAc
// Either underrun, or no data at all. Caller output tends to just
// buffer loop if it doesn't get anything, so always produce a full
// buffer, and silence anything we couldn't supply.
clearBuffers(ioData, amountToRead - amountRead, amountRead / bytesPerPacket);
clearBuffers(ioData, (amountToRead - amountRead) / bytesPerPacket, amountRead / bytesPerPacket);
}
return 0;