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 <kode54@gmail.com>
This commit is contained in:
Christopher Snowhill 2025-04-24 14:54:41 -07:00
parent bd8aa0e91b
commit 1bea1699a1

View file

@ -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];