Remove the renderVoiceToOutput method and add a missing comment
This commit is contained in:
parent
81fe043bb3
commit
f9178d41aa
2 changed files with 13 additions and 20 deletions
|
|
@ -801,20 +801,6 @@ void sfz::Synth::setSampleRate(float sampleRate) noexcept
|
|||
}
|
||||
}
|
||||
|
||||
void sfz::Synth::renderVoiceToOutputs(Voice& voice, AudioSpan<float>& 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<float> buffer) noexcept
|
||||
{
|
||||
ScopedFTZ ftz;
|
||||
|
|
@ -865,7 +851,17 @@ void sfz::Synth::renderBlock(AudioSpan<float> 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();
|
||||
|
|
|
|||
|
|
@ -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<float>& tempSpan) noexcept;
|
||||
|
||||
fs::file_time_type checkModificationTime();
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue