Skip to content

Commit 69255f0

Browse files
committed
fix volume drop again
1 parent c0d1785 commit 69255f0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/deluge/dsp/master_compressor/master_compressor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ void MasterCompressor::render(StereoSample* buffer, uint16_t numSamples) {
6161
float reduction = 21 * (out / ONE_Q31f);
6262
//this lowers the volume so we'll increase the levels afterwards
6363

64-
finalVolume = exp(std::min<float>(er + reduction, 1)) * float(1 << 29);
64+
finalVolume = exp(std::min<float>(1 - er + reduction, 1)) * float(1 << 29);
6565

6666
amplitudeIncrement = (int32_t)(finalVolume - currentVolume) / numSamples;
6767

src/deluge/processing/engines/audio_engine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,8 +760,8 @@ void routine() {
760760
}
761761
logAction("mastercomp start");
762762
mastercompressor.render(renderingBuffer, numSamples);
763-
masterVolumeAdjustmentL <<= 2;
764-
masterVolumeAdjustmentR <<= 2;
763+
masterVolumeAdjustmentL <<= 3;
764+
masterVolumeAdjustmentR <<= 3;
765765
logAction("mastercomp end");
766766
metronome.render(renderingBuffer, numSamples);
767767

0 commit comments

Comments
 (0)