Core Audio: Shut off device after fade out

And resume playback before fade in.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
Christopher Snowhill 2025-03-07 23:44:24 -08:00
parent 46aac2fa91
commit 1d8803e6f2

View file

@ -169,6 +169,13 @@ current_device_listener(AudioObjectID inObjectID, UInt32 inNumberAddresses, cons
rendered = NO;
}
if(faded && !paused) {
resetting = YES;
[self pause];
started = NO;
resetting = NO;
}
if(!started && !paused) {
// Prevent this call from hanging when used in this thread, when buffer may be empty
// and waiting for this very thread to fill it