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:
parent
bd8aa0e91b
commit
1bea1699a1
1 changed files with 1 additions and 12 deletions
|
@ -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];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue