Some splitting of code
This commit is contained in:
16
Source/SynthVoice/SimpleDelay.h
Normal file
16
Source/SynthVoice/SimpleDelay.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
#include "../SynthVoice.h"
|
||||
|
||||
void NeuralSynthVoice::renderSimpleDelay(juce::dsp::AudioBlock<float> &block)
|
||||
{
|
||||
// ================================================================
|
||||
// Simple Delay (per-voice)
|
||||
// ================================================================
|
||||
if (shared.delayOn && shared.delayOn->load() > 0.5f)
|
||||
{
|
||||
auto& delay = chain.get<delayIndex>();
|
||||
const float time = shared.delayTime ? shared.delayTime->load() : 0.1f;
|
||||
delay.setDelay (juce::jmax (0.0f, time * (float) spec.sampleRate));
|
||||
delay.process (juce::dsp::ProcessContextReplacing<float> (block));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user