Don't forget to apply source depth on first source

This commit is contained in:
Jean Pierre Cimalando 2020-07-28 15:47:43 +02:00
parent 30788baec4
commit 748b8dc22c

View file

@ -329,6 +329,10 @@ float* ModMatrix::getModulation(TargetId targetId)
if (useThisSource) {
if (isFirstSource) {
source.gen->generate(source.key, impl.voiceId_, buffer);
if (sourceDepth != 1) {
for (uint32_t i = 0; i < numFrames; ++i)
buffer[i] *= sourceDepth;
}
isFirstSource = false;
}
else {