| 950 | |
| 951 | |
| 952 | void JavascriptMasterEffect::applyEffect(AudioSampleBuffer &b, int startSample, int numSamples) |
| 953 | { |
| 954 | ignoreUnused(startSample); |
| 955 | |
| 956 | if (getActiveNetwork() != nullptr) |
| 957 | { |
| 958 | getActiveNetwork()->process(b, eventBuffer); |
| 959 | return; |
| 960 | } |
| 961 | |
| 962 | if (!processBlockCallback->isSnippetEmpty() && lastResult.wasOk()) |
| 963 | { |
| 964 | jassert(startSample == 0); |
| 965 | CHECK_AND_LOG_ASSERTION(this, DebugLogger::Location::ScriptFXRendering, startSample == 0, startSample); |
| 966 | |
| 967 | float *l = b.getWritePointer(0, 0); |
| 968 | float *r = b.getWritePointer(1, 0); |
| 969 | |
| 970 | if (auto lb = channels[0].getBuffer()) |
| 971 | lb->referToData(l, numSamples); |
| 972 | |
| 973 | if (auto rb = channels[1].getBuffer()) |
| 974 | rb->referToData(r, numSamples); |
| 975 | |
| 976 | scriptEngine->setCallbackParameter((int)Callback::processBlock, 0, channelData); |
| 977 | scriptEngine->executeCallback((int)Callback::processBlock, &lastResult); |
| 978 | |
| 979 | BACKEND_ONLY(if (!lastResult.wasOk()) debugError(this, lastResult.getErrorMessage())); |
| 980 | } |
| 981 | } |
| 982 | |
| 983 | void JavascriptMasterEffect::setBypassed(bool shouldBeBypassed, NotificationType notifyChangeHandler) noexcept |
| 984 | { |
nothing calls this directly
no test coverage detected