Skip to content

Commit

Permalink
move record point to before volume
Browse files Browse the repository at this point in the history
  • Loading branch information
m-m-adams committed Jan 12, 2025
1 parent 40562f8 commit 5d6424b
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ GlobalEffectableForClip::GlobalEffectableForClip() {
processFXForGlobalEffectable(globalEffectableBuffer, numSamples, &volumePostFX, paramManagerForClip,
delayWorkingState, renderedLastTime, reverbSendAmount);
processStutter(globalEffectableBuffer, numSamples, paramManagerForClip);
// record before pan/compression/volume to keep volumes consistent
if (recorder && recorder->status < RecorderStatus::FINISHED_CAPTURING_BUT_STILL_WRITING) {
// we need to double it because for reasons I don't understand audio clips max volume is half the sample volume
recorder->feedAudio((int32_t*)globalEffectableBuffer, numSamples, true, 2);
}

processReverbSendAndVolume(globalEffectableBuffer, numSamples, reverbBuffer, volumePostFX, postReverbVolume,
reverbSendAmount, pan, true);
Expand All @@ -149,10 +154,7 @@ GlobalEffectableForClip::GlobalEffectableForClip() {
else {
compressor.reset();
}
if (recorder && recorder->status < RecorderStatus::FINISHED_CAPTURING_BUT_STILL_WRITING) {
// we need to double it because for reasons I don't understand audio clips max volume is half the sample volume
recorder->feedAudio((int32_t*)globalEffectableBuffer, numSamples, true, 2);
}

addAudio(globalEffectableBuffer, outputBuffer, numSamples);

postReverbVolumeLastTime = postReverbVolume;
Expand Down

0 comments on commit 5d6424b

Please sign in to comment.