| 742 | } |
| 743 | |
| 744 | bool VST3Wrapper::Initialize(EffectSettings& settings, Steinberg::Vst::SampleRate sampleRate, Steinberg::int32 processMode, Steinberg::int32 maxSamplesPerBlock) |
| 745 | { |
| 746 | using namespace Steinberg; |
| 747 | |
| 748 | Vst::ProcessSetup setup = { |
| 749 | processMode, |
| 750 | Vst::kSample32, |
| 751 | maxSamplesPerBlock, |
| 752 | sampleRate |
| 753 | }; |
| 754 | |
| 755 | if(!SetupProcessing(*mEffectComponent.get(), setup)) |
| 756 | return false; |
| 757 | |
| 758 | mSetup = setup; |
| 759 | |
| 760 | FetchSettings(settings); |
| 761 | |
| 762 | if(mEffectComponent->setActive(true) == kResultOk) |
| 763 | { |
| 764 | if(mAudioProcessor->setProcessing(true) != kResultFalse) |
| 765 | { |
| 766 | mProcessContext.state = Vst::ProcessContext::kPlaying; |
| 767 | mProcessContext.sampleRate = sampleRate; |
| 768 | |
| 769 | mActive = true; |
| 770 | ConsumeChanges(settings); |
| 771 | //make zero-flush, to make sure parameters are delivered to the processor... |
| 772 | Process(nullptr, nullptr, 0); |
| 773 | StoreSettings(settings); |
| 774 | return true; |
| 775 | } |
| 776 | } |
| 777 | return false; |
| 778 | } |
| 779 | |
| 780 | void VST3Wrapper::Finalize(EffectSettings* settings) |
| 781 | { |
no test coverage detected