Cog Audio: Add explanatory comment to source code

CQTexperiment
Christopher Snowhill 2022-01-12 03:36:27 -08:00
parent 84d445cffe
commit f1d70aaa54
1 changed files with 4 additions and 1 deletions

View File

@ -400,7 +400,10 @@ static void extrapolate(float *buffer, size_t channels, size_t frameSize, size_t
{ {
char writeBuf[CHUNK_SIZE]; char writeBuf[CHUNK_SIZE];
while ([self shouldContinue] == YES) //Need to watch EOS somehow.... // Removed endOfStream check from here, since we want to be able to flush the converter
// when the end of stream is reached. Convert function instead processes what it can,
// and returns 0 samples when it has nothing more to process at the end of stream.
while ([self shouldContinue] == YES)
{ {
int amountConverted = [self convert:writeBuf amount:CHUNK_SIZE]; int amountConverted = [self convert:writeBuf amount:CHUNK_SIZE];
if (!amountConverted) if (!amountConverted)