| 642 | }; |
| 643 | |
| 644 | bool NyquistBase::Process(EffectInstance&, EffectSettings& settings) |
| 645 | { |
| 646 | if (mIsPrompt && mControls.size() > 0 && !IsBatchProcessing()) |
| 647 | { |
| 648 | auto& nyquistSettings = GetSettings(settings); |
| 649 | auto cleanup = finally([&] { |
| 650 | // Free up memory |
| 651 | nyquistSettings.proxySettings = {}; |
| 652 | }); |
| 653 | NyquistBase proxy { NYQUIST_WORKER_ID }; |
| 654 | proxy.SetCommand(mInputCmd); |
| 655 | proxy.mDebug = nyquistSettings.proxyDebug; |
| 656 | proxy.mControls = move(nyquistSettings.controls); |
| 657 | auto result = Delegate(proxy, nyquistSettings.proxySettings); |
| 658 | if (result) |
| 659 | { |
| 660 | mT0 = proxy.mT0; |
| 661 | mT1 = proxy.mT1; |
| 662 | } |
| 663 | return result; |
| 664 | } |
| 665 | |
| 666 | // Check for reentrant Nyquist commands. |
| 667 | // I'm choosing to mark skipped Nyquist commands as successful even though |
| 668 | // they are skipped. The reason is that when Nyquist calls out to a chain, |
| 669 | // and that chain contains Nyquist, it will be clearer if the chain |
| 670 | // completes skipping Nyquist, rather than doing nothing at all. |
| 671 | if (mReentryCount > 0) |
| 672 | return true; |
| 673 | |
| 674 | // Restore the reentry counter (to zero) when we exit. |
| 675 | auto countRestorer = valueRestorer(mReentryCount); |
| 676 | mReentryCount++; |
| 677 | RegisterFunctions(); |
| 678 | |
| 679 | bool success = true; |
| 680 | int nEffectsSoFar = EffectOutputTracks::nEffectsDone; |
| 681 | mProjectChanged = false; |
| 682 | EffectManager& em = EffectManager::Get(); |
| 683 | em.SetSkipStateFlag(false); |
| 684 | |
| 685 | // This code was added in a fix for bug 2392 (no preview for Nyquist) |
| 686 | // It was commented out in a fix for bug 2428 (no progress dialog from a |
| 687 | // macro) |
| 688 | // if (mExternal) { |
| 689 | // mProgress->Hide(); |
| 690 | //} |
| 691 | |
| 692 | mOutputTime = 0; |
| 693 | mCount = 0; |
| 694 | const auto scale = |
| 695 | (GetType() == EffectTypeProcess ? 0.5 : 1.0) / GetNumWaveGroups(); |
| 696 | |
| 697 | mStop = false; |
| 698 | mBreak = false; |
| 699 | mCont = false; |
| 700 | |
| 701 | mTrackIndex = 0; |
nothing calls this directly
no test coverage detected