Core Audio output: Attempt to fix deadlock near track transitions when buffer resets occur
parent
5f82fa572e
commit
16a58e87a0
|
@ -221,6 +221,9 @@ default_device_changed(AudioObjectID inObjectID, UInt32 inNumberAddresses, const
|
|||
}
|
||||
|
||||
if ([outputController shouldReset]) {
|
||||
size_t length = [[outputController buffer] bufferedLength];
|
||||
atomic_fetch_add(&bytesRendered, length);
|
||||
[outputController incrementAmountPlayed:length];
|
||||
[[outputController buffer] empty];
|
||||
[outputController setShouldReset:NO];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue