Cog Audio: Fix converter so that seeking on startup playback position resume works properly
This commit is contained in:
parent
16402f9982
commit
84d445cffe
1 changed files with 9 additions and 1 deletions
|
@ -403,7 +403,15 @@ static void extrapolate(float *buffer, size_t channels, size_t frameSize, size_t
|
|||
while ([self shouldContinue] == YES) //Need to watch EOS somehow....
|
||||
{
|
||||
int amountConverted = [self convert:writeBuf amount:CHUNK_SIZE];
|
||||
if (!amountConverted) break;
|
||||
if (!amountConverted)
|
||||
{
|
||||
if (emittingSilence)
|
||||
{
|
||||
memset(writeBuf, 0, sizeof(writeBuf));
|
||||
amountConverted = CHUNK_SIZE;
|
||||
}
|
||||
else break;
|
||||
}
|
||||
[self writeData:writeBuf amount:amountConverted];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue