From 653d143c037a0d89f05e6af22fa4e2afc8a15f6c Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Fri, 7 Mar 2025 23:44:46 -0800 Subject: [PATCH] Core Audio: Increase fade duration to 125ms Signed-off-by: Christopher Snowhill --- Audio/Output/OutputCoreAudio.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Audio/Output/OutputCoreAudio.m b/Audio/Output/OutputCoreAudio.m index 7fc1b12b0..d178dbf32 100644 --- a/Audio/Output/OutputCoreAudio.m +++ b/Audio/Output/OutputCoreAudio.m @@ -902,16 +902,16 @@ static BOOL fadeAudio(float * samples, size_t channels, size_t count, float * fa return deviceChannelConfig; } -// 10 milliseconds +// 125 milliseconds - (void)fadeOut { fadeTarget = 0.0f; - fadeStep = ((fadeTarget - fadeLevel) / deviceFormat.mSampleRate) * (1000.0f / 10.0f); + fadeStep = ((fadeTarget - fadeLevel) / deviceFormat.mSampleRate) * (1000.0f / 125.0f); fading = YES; } - (void)fadeIn { fadeTarget = 1.0; - fadeStep = ((fadeTarget - fadeLevel) / deviceFormat.mSampleRate) * (1000.0f / 10.0f); + fadeStep = ((fadeTarget - fadeLevel) / deviceFormat.mSampleRate) * (1000.0f / 125.0f); fading = YES; faded = NO; }