[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>main
parent
f8a8a57cf0
commit
8d8b508d09
|
@ -710,6 +710,7 @@ tryagain:
|
||||||
|
|
||||||
ioNumberPackets -= ioNumberPackets % dmFloatFormat.mBytesPerPacket;
|
ioNumberPackets -= ioNumberPackets % dmFloatFormat.mBytesPerPacket;
|
||||||
|
|
||||||
|
if(ioNumberPackets) {
|
||||||
AudioChunk *chunk = [[AudioChunk alloc] init];
|
AudioChunk *chunk = [[AudioChunk alloc] init];
|
||||||
[chunk setFormat:nodeFormat];
|
[chunk setFormat:nodeFormat];
|
||||||
if(nodeChannelConfig) {
|
if(nodeChannelConfig) {
|
||||||
|
@ -719,9 +720,12 @@ tryagain:
|
||||||
|
|
||||||
floatOffset += ioNumberPackets;
|
floatOffset += ioNumberPackets;
|
||||||
amountRead += ioNumberPackets;
|
amountRead += ioNumberPackets;
|
||||||
|
|
||||||
convertEntered = NO;
|
convertEntered = NO;
|
||||||
return chunk;
|
return chunk;
|
||||||
|
}
|
||||||
|
|
||||||
|
convertEntered = NO;
|
||||||
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)observeValueForKeyPath:(NSString *)keyPath
|
- (void)observeValueForKeyPath:(NSString *)keyPath
|
||||||
|
|
Loading…
Reference in New Issue