MCPcopy Create free account
hub / github.com/amsynth/amsynth / Process

Method Process

src/core/synth/VoiceAllocationUnit.cpp:312–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310}
311
312void
313VoiceAllocationUnit::Process (float *l, float *r, unsigned nframes, int stride)
314{
315 assert(nframes <= VoiceBoard::kMaxProcessBufferSize);
316
317 memset(mBuffer, 0, nframes * sizeof (float));
318
319 for (unsigned i=0; i<_voices.size(); i++) {
320 if (active[i]) {
321 if (_voices[i]->isSilent()) {
322 active[i] = false;
323 } else {
324 _voices[i]->SetPitchBend(mPitchBendValue);
325 _voices[i]->ProcessSamplesMix (mBuffer, nframes, mMasterVol);
326 }
327 }
328 }
329
330 distortion->Process (mBuffer, nframes);
331
332 for (unsigned i=0; i<nframes; i++) {
333 l[i * stride] = mBuffer[i] * mPanGainLeft;
334 r[i * stride] = mBuffer[i] * mPanGainRight;
335 }
336
337 reverb->processmix (l, r, l, r, nframes, stride);
338 limiter->Process (l,r, nframes, stride);
339}
340
341void
342VoiceAllocationUnit::setKeyboardMode(KeyboardMode keyboardMode)

Callers

nothing calls this directly

Calls 4

isSilentMethod · 0.80
SetPitchBendMethod · 0.80
ProcessSamplesMixMethod · 0.80
processmixMethod · 0.80

Tested by

no test coverage detected