[Audio Converter] Minor change for format changes
This should also seal up any potential hole for problems if there's an audio format change and no audio buffered. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
parent
ac9e404b23
commit
833e298d3d
1 changed files with 13 additions and 9 deletions
|
@ -710,6 +710,7 @@ tryagain:
|
|||
|
||||
ioNumberPackets -= ioNumberPackets % dmFloatFormat.mBytesPerPacket;
|
||||
|
||||
if(ioNumberPackets) {
|
||||
AudioChunk *chunk = [[AudioChunk alloc] init];
|
||||
[chunk setFormat:nodeFormat];
|
||||
if(nodeChannelConfig) {
|
||||
|
@ -719,11 +720,14 @@ tryagain:
|
|||
|
||||
floatOffset += ioNumberPackets;
|
||||
amountRead += ioNumberPackets;
|
||||
|
||||
convertEntered = NO;
|
||||
return chunk;
|
||||
}
|
||||
|
||||
convertEntered = NO;
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)observeValueForKeyPath:(NSString *)keyPath
|
||||
ofObject:(id)object
|
||||
change:(NSDictionary *)change
|
||||
|
|
Loading…
Reference in a new issue