Bug Fix: Fix inserting empty chunks on track ends
This code did not check the number of samples in a packet before adding it to the output buffer, which apparently had the potential to cause the output code to emit up to 512 samples of silence between tracks. This, as one can guess, is a bad thing, and causes noticeable gapping between tracks. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
parent
73951d6fe7
commit
2282538c42
1 changed files with 1 additions and 3 deletions
|
@ -625,9 +625,7 @@ current_device_listener(AudioObjectID inObjectID, UInt32 inNumberAddresses, cons
|
|||
|
||||
AudioChunk *chunk = [self renderInput:512];
|
||||
size_t frameCount = 0;
|
||||
if(chunk) {
|
||||
frameCount = [chunk frameCount];
|
||||
|
||||
if(chunk && (frameCount = [chunk frameCount])) {
|
||||
[outputLock lock];
|
||||
[outputBuffer addChunk:chunk];
|
||||
[outputLock unlock];
|
||||
|
|
Loading…
Reference in a new issue