| 598 | } |
| 599 | |
| 600 | void JavascriptPolyphonicEffect::renderVoice(int voiceIndex, AudioSampleBuffer &b, int startSample, int numSamples) |
| 601 | { |
| 602 | if (auto n = getActiveNetwork()) |
| 603 | { |
| 604 | |
| 605 | |
| 606 | float* channels[NUM_MAX_CHANNELS]; |
| 607 | |
| 608 | int numChannels = b.getNumChannels(); |
| 609 | memcpy(channels, b.getArrayOfWritePointers(), sizeof(float*) * numChannels); |
| 610 | |
| 611 | for (int i = 0; i < numChannels; i++) |
| 612 | channels[i] += startSample; |
| 613 | |
| 614 | scriptnode::ProcessDataDyn d(channels, numSamples, numChannels); |
| 615 | |
| 616 | if (checkPreSuspension(voiceIndex, d)) |
| 617 | return; |
| 618 | |
| 619 | scriptnode::DspNetwork::VoiceSetter vs(*n, voiceIndex); |
| 620 | n->getRootNode()->process(d); |
| 621 | |
| 622 | checkPostSuspension(voiceIndex, d); |
| 623 | |
| 624 | // overwrite the tailing with the voice index to cater in |
| 625 | // voice resetting calls... |
| 626 | isTailing = voiceData.containsVoiceIndex(voiceIndex); |
| 627 | } |
| 628 | } |
| 629 | |
| 630 | void JavascriptPolyphonicEffect::startVoice(int voiceIndex, const HiseEvent& e) |
| 631 | { |
no test coverage detected