diff --git a/src/sfizz/Synth.cpp b/src/sfizz/Synth.cpp index f4caa9a4..0b37df6d 100644 --- a/src/sfizz/Synth.cpp +++ b/src/sfizz/Synth.cpp @@ -801,20 +801,6 @@ void sfz::Synth::setSampleRate(float sampleRate) noexcept } } -void sfz::Synth::renderVoiceToOutputs(Voice& voice, AudioSpan& tempSpan) noexcept -{ - const Region* region = voice.getRegion(); - ASSERT(region != nullptr); - - voice.renderBlock(tempSpan); - for (size_t i = 0, n = effectBuses.size(); i < n; ++i) { - if (auto& bus = effectBuses[i]) { - float addGain = region->getGainToEffectBus(i); - bus->addToInputs(tempSpan, addGain, tempSpan.getNumFrames()); - } - } -} - void sfz::Synth::renderBlock(AudioSpan buffer) noexcept { ScopedFTZ ftz; @@ -865,7 +851,17 @@ void sfz::Synth::renderBlock(AudioSpan buffer) noexcept mm.beginVoice(voice->getId(), voice->getRegion()->getId(), voice->getTriggerEvent().value); activeVoices++; - renderVoiceToOutputs(*voice, *tempSpan); + + const Region* region = voice->getRegion(); + ASSERT(region != nullptr); + + voice->renderBlock(*tempSpan); + for (size_t i = 0, n = effectBuses.size(); i < n; ++i) { + if (auto& bus = effectBuses[i]) { + float addGain = region->getGainToEffectBus(i); + bus->addToInputs(*tempSpan, addGain, numFrames); + } + } callbackBreakdown.data += voice->getLastDataDuration(); callbackBreakdown.amplitude += voice->getLastAmplitudeDuration(); callbackBreakdown.filters += voice->getLastFilterDuration(); diff --git a/src/sfizz/Synth.h b/src/sfizz/Synth.h index af3aa469..48aa69f7 100644 --- a/src/sfizz/Synth.h +++ b/src/sfizz/Synth.h @@ -742,13 +742,10 @@ private: void setupModMatrix(); /** - * @brief Render the voice to its designated outputs and effect busses. + * @brief Get the modification time of all included sfz files * - * @param voice - * @param tempSpan a temporary span used for rendering + * @return fs::file_time_type */ - void renderVoiceToOutputs(Voice& voice, AudioSpan& tempSpan) noexcept; - fs::file_time_type checkModificationTime(); /**