Skip to content

Commit

Permalink
Update chowdsp_MonoCompressor.h
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 authored Jul 24, 2023
1 parent 138dbda commit 0c847d5
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ class MonoCompressor
gainComputerBuffer.setMaxSize (1, (int) spec.maximumBlockSize);

if constexpr (! std::is_same_v<GainReductionMeterTask, NullType>)
gainReductionMeterTask.prepare (spec.sampleRate, (int) spec.maximumBlockSize, (int) spec.numChannels);
{
// The gain reduction meter always needs to be prepared for 2 channels,
// one for the input buffer, and one for the output buffer.
gainReductionMeterTask.prepare (spec.sampleRate, (int) spec.maximumBlockSize, 2);
}
}

/** Processes a block of audio */
Expand Down

0 comments on commit 0c847d5

Please sign in to comment.