Audio Output: Fix converter to always emit trailing samples on end of track
parent
8e895c88c0
commit
25a43a9083
|
@ -282,7 +282,7 @@ static OSStatus ACFloatProc(AudioConverterRef inAudioConverter,
|
||||||
convertEntered = YES;
|
convertEntered = YES;
|
||||||
|
|
||||||
tryagain2:
|
tryagain2:
|
||||||
if (stopping || [self shouldContinue] == NO || [self endOfStream] == YES)
|
if (stopping || [self shouldContinue] == NO)
|
||||||
{
|
{
|
||||||
convertEntered = NO;
|
convertEntered = NO;
|
||||||
return amountRead;
|
return amountRead;
|
||||||
|
@ -376,6 +376,12 @@ tryagain2:
|
||||||
amountRead += ioNumberPackets * outputFormat.mBytesPerPacket;
|
amountRead += ioNumberPackets * outputFormat.mBytesPerPacket;
|
||||||
if (err == 100)
|
if (err == 100)
|
||||||
{
|
{
|
||||||
|
if ([self endOfStream] == YES)
|
||||||
|
{
|
||||||
|
convertEntered = NO;
|
||||||
|
return amountRead;
|
||||||
|
}
|
||||||
|
|
||||||
goto tryagain2;
|
goto tryagain2;
|
||||||
}
|
}
|
||||||
else if (err != noErr && err != kAudioConverterErr_InvalidInputSize)
|
else if (err != noErr && err != kAudioConverterErr_InvalidInputSize)
|
||||||
|
|
Loading…
Reference in New Issue