HDCD: Stop dynamically halving the volume
Some checks failed
Check if Cog buildable / Build Universal Cog.app (push) Has been cancelled

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 3b4313d844
commit 5753c48245

View file

@ -713,17 +713,6 @@ current_device_listener(AudioObjectID inObjectID, UInt32 inNumberAddresses, cons
} }
double secondsRendered = (double)renderedSamples / format->mSampleRate; 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]; [fadersLock lock];
for(size_t i = 0; i < [faders count];) { for(size_t i = 0; i < [faders count];) {
@ -737,7 +726,7 @@ current_device_listener(AudioObjectID inObjectID, UInt32 inNumberAddresses, cons
} }
[fadersLock unlock]; [fadersLock unlock];
scale_by_volume(outSamples, frameCount * channels, volumeScale * _self->volume); scale_by_volume(outSamples, frameCount * channels, _self->volume);
[_self updateLatency:secondsRendered]; [_self updateLatency:secondsRendered];