From cd85299df5801a03edb1abb46f5f263701628ebf Mon Sep 17 00:00:00 2001 From: itsmattkc <34096995+itsmattkc@users.noreply.github.com> Date: Fri, 10 Jun 2022 11:43:50 -0700 Subject: [PATCH] pan: fixed issue where original value was passed through --- app/node/audio/pan/pan.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/app/node/audio/pan/pan.cpp b/app/node/audio/pan/pan.cpp index 220ba9585..77e194506 100644 --- a/app/node/audio/pan/pan.cpp +++ b/app/node/audio/pan/pan.cpp @@ -69,8 +69,6 @@ void PanNode::Value(const NodeValueRow &value, const NodeGlobals &globals, NodeV // Create a sample job SampleBuffer samples = value[kSamplesInput].toSamples(); if (samples.is_allocated()) { - bool pushed_job = false; - // This node is only compatible with stereo audio if (samples.audio_params().channel_count() == 2) { // If the input is static, we can just do it now which will be faster @@ -83,15 +81,14 @@ void PanNode::Value(const NodeValueRow &value, const NodeGlobals &globals, NodeV samples.transform_volume_for_channel(1, 1.0f + pan_volume); } } + + table->Push(NodeValue(NodeValue::kSamples, samples, this)); } else { // Requires job - - pushed_job = true; table->Push(NodeValue::kSamples, SampleJob(kSamplesInput, value), this); } - } - - if (!pushed_job) { + } else { + // Pass right through table->Push(value[kSamplesInput]); } }