Bug Fix: Restart converter on format change
The converter doesn't just require an output format call, it also requires this input format change callback to actually signal it to reopen the converter process with a new format setup. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
parent
780d9ae759
commit
267948350a
1 changed files with 3 additions and 0 deletions
|
@ -273,6 +273,9 @@
|
||||||
}
|
}
|
||||||
if(inputNode) {
|
if(inputNode) {
|
||||||
AudioStreamBasicDescription inputFormat = [inputNode nodeFormat];
|
AudioStreamBasicDescription inputFormat = [inputNode nodeFormat];
|
||||||
|
if(converter) {
|
||||||
|
[converter inputFormatDidChange:inputFormat inputConfig:[inputNode nodeChannelConfig]];
|
||||||
|
}
|
||||||
[inputNode seek:(long)(amountPlayed * inputFormat.mSampleRate)];
|
[inputNode seek:(long)(amountPlayed * inputFormat.mSampleRate)];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue