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 31640b45d8
commit d7dd775447

View file

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