From 1bea1699a1b1785b1ee3d04ac83ae1fe93d5678f Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Thu, 24 Apr 2025 14:54:41 -0700 Subject: [PATCH] HDCD: Stop dynamically halving the volume Apparently, this doesn't work too well with real HDCD tracks, and causes all sorts of weird volume issues. Just leave the volume alone, and let HDCD decoding make tracks louder, possibly, rather than try to halve the volume automatically on a detector that isn't terribly good. Signed-off-by: Christopher Snowhill --- Audio/Output/OutputCoreAudio.m | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/Audio/Output/OutputCoreAudio.m b/Audio/Output/OutputCoreAudio.m index ffcca853e..dbe696cdf 100644 --- a/Audio/Output/OutputCoreAudio.m +++ b/Audio/Output/OutputCoreAudio.m @@ -713,17 +713,6 @@ current_device_listener(AudioObjectID inObjectID, UInt32 inNumberAddresses, cons } double secondsRendered = (double)renderedSamples / format->mSampleRate; - float volumeScale = 1.0; - double sustained; - sustained = _self->secondsHdcdSustained; - if(sustained > 0) { - if(sustained < secondsRendered) { - _self->secondsHdcdSustained = 0.0; - } else { - _self->secondsHdcdSustained = sustained - secondsRendered; - volumeScale = 0.5; - } - } [fadersLock lock]; for(size_t i = 0; i < [faders count];) { @@ -737,7 +726,7 @@ current_device_listener(AudioObjectID inObjectID, UInt32 inNumberAddresses, cons } [fadersLock unlock]; - scale_by_volume(outSamples, frameCount * channels, volumeScale * _self->volume); + scale_by_volume(outSamples, frameCount * channels, _self->volume); [_self updateLatency:secondsRendered];