Bug Fix: Stop track fades from hanging on occasion

Track fades could hang if fired in rapid succession. Now each fade will
be guaranteed to resume input feeding upon removing the current input to
the background fade-out queue.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
Christopher Snowhill 2025-06-11 19:00:45 -07:00
parent c0d411f002
commit cb9c4d9c01

View file

@ -982,6 +982,7 @@ current_device_listener(AudioObjectID inObjectID, UInt32 inNumberAddresses, cons
[fadedBuffers addObject:buffer];
[fadedBuffersLock unlock];
[outputLock unlock];
cutOffInput = NO;
}
- (void)fadeIn {
@ -990,7 +991,6 @@ current_device_listener(AudioObjectID inObjectID, UInt32 inNumberAddresses, cons
fadeStep = ((fadeTarget - fadeLevel) / deviceFormat.mSampleRate) * (1000.0f / 125.0f);
fading = YES;
faded = NO;
cutOffInput = NO;
}
@end