MCPcopy Create free account
hub / github.com/christophhart/HISE / prepareToPlay

Method prepareToPlay

hi_scripting/scripting/ScriptProcessorModules.cpp:582–598  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

580}
581
582void JavascriptPolyphonicEffect::prepareToPlay(double sampleRate, int samplesPerBlock)
583{
584 VoiceEffectProcessor::prepareToPlay(sampleRate, samplesPerBlock);
585
586 if (sampleRate == -1.0)
587 return;
588
589 if (auto n = getActiveNetwork())
590 {
591 auto numChannels = dynamic_cast<RoutableProcessor*>(getParentProcessor(true))->getMatrix().getNumSourceChannels();
592
593 setVoiceKillerToUse(this);
594
595 n->setNumChannels(numChannels);
596 n->prepareToPlay(sampleRate, (double)samplesPerBlock);
597 }
598}
599
600void JavascriptPolyphonicEffect::renderVoice(int voiceIndex, AudioSampleBuffer &b, int startSample, int numSamples)
601{

Callers

nothing calls this directly

Calls 15

connectionChangedFunction · 0.85
varFunction · 0.85
getNumSourceChannelsMethod · 0.80
isSnippetEmptyMethod · 0.80
setCallbackParameterMethod · 0.80
prepareToPlayFunction · 0.50
ifFunction · 0.50
setNumChannelsMethod · 0.45
wasOkMethod · 0.45
executeCallbackMethod · 0.45
getErrorMessageMethod · 0.45
getNumChannelsMethod · 0.45

Tested by

no test coverage detected