MCPcopy Create free account
hub / github.com/DamRsn/NeuralNote / renderNextBlock

Method renderNextBlock

Lib/Player/SynthVoice.cpp:64–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64void SynthVoice::renderNextBlock(AudioBuffer<float>& outputBuffer, int startSample, int numSamples)
65{
66 for (int i = startSample; i < numSamples; i++) {
67 float value = 0.25f * mAmplitude * mADSR.getNextSample() * mOsc.processSample(0);
68 outputBuffer.addSample(0, i, value);
69
70 if (!mADSR.isActive()) {
71 clearCurrentNote();
72 return;
73 }
74 }
75}

Callers 1

processBlockMethod · 0.80

Calls 1

isActiveMethod · 0.80

Tested by

no test coverage detected