From e8b6692d778dd4ad0f0dc8429604363d43d5d663 Mon Sep 17 00:00:00 2001 From: Paul Fd Date: Sun, 9 Feb 2020 23:02:19 +0100 Subject: [PATCH] Changed to the pan helper --- src/sfizz/Voice.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/sfizz/Voice.cpp b/src/sfizz/Voice.cpp index d4a3e6f0..4ba8f016 100644 --- a/src/sfizz/Voice.cpp +++ b/src/sfizz/Voice.cpp @@ -294,15 +294,8 @@ void sfz::Voice::processMono(AudioSpan buffer) noexcept copy(leftBuffer, rightBuffer); panEnvelope.getBlock(span1); - // We assume that the pan envelope is already normalized between -1 and 1 - // Check bm_pan for your architecture to check if it's interesting to use the pan helper instead - fill(span2, 1.0f); - add(span1, span2); - applyGain(piFour, span2); - cos(span2, span1); - sin(span2, span2); - applyGain(span1, leftBuffer); - applyGain(span2, rightBuffer); + copy(leftBuffer, rightBuffer); + pan(span1, leftBuffer, rightBuffer); } void sfz::Voice::processStereo(AudioSpan buffer) noexcept