Bug Fix: Downmixer converter should update now
The Downmixer wasn't updating its output format correctly, so it was prone to outputting the wrong format for a while, which could confuse the output device and produce garbage output. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
parent
d2970e593d
commit
7088aae2e9
1 changed files with 10 additions and 0 deletions
|
@ -81,6 +81,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setOutputFormat:(AudioStreamBasicDescription)format withChannelConfig:(uint32_t)config {
|
- (void)setOutputFormat:(AudioStreamBasicDescription)format withChannelConfig:(uint32_t)config {
|
||||||
|
if(memcmp(&outputFormat, &format, sizeof(outputFormat)) != 0 ||
|
||||||
|
outputChannelConfig != config) {
|
||||||
|
paused = YES;
|
||||||
|
while(processEntered) {
|
||||||
|
usleep(500);
|
||||||
|
}
|
||||||
|
[super resetBuffer];
|
||||||
|
[self fullShutdown];
|
||||||
|
paused = NO;
|
||||||
|
}
|
||||||
outputFormat = format;
|
outputFormat = format;
|
||||||
outputChannelConfig = config;
|
outputChannelConfig = config;
|
||||||
formatSet = YES;
|
formatSet = YES;
|
||||||
|
|
Loading…
Reference in a new issue