| 310 | } |
| 311 | |
| 312 | void |
| 313 | VoiceAllocationUnit::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 | |
| 341 | void |
| 342 | VoiceAllocationUnit::setKeyboardMode(KeyboardMode keyboardMode) |
nothing calls this directly
no test coverage detected