MCPcopy Create free account
hub / github.com/audacity/audacity / VSTEditor

Method VSTEditor

src/effects/VST/VSTEditor.cpp:516–551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514}
515
516VSTEditor::VSTEditor(
517 VSTInstance& instance,
518 EffectType type,
519 bool gui,
520 const EffectUIServices& services,
521 EffectSettingsAccess& access,
522 wxWindow* pParent,
523 int numParams
524)
525 : EffectEditor(services, access),
526 mType{ type },
527 mInstance(instance),
528 mGui{ gui },
529 mParent(pParent),
530 mDialog( static_cast<wxDialog*>(wxGetTopLevelParent(pParent)) ),
531 mNumParams(numParams)
532{
533 // In case of nondestructive processing, put an initial message in the
534 // queue for the instance
535 mAccess.ModifySettings([&](EffectSettings &settings){
536 return GetInstance().MakeMessageFS(VSTInstance::GetSettings(settings));
537 });
538
539 auto settings = mAccess.Get();
540 StoreSettingsToInstance(settings);
541
542 //! Note the parameter names for later use
543 mInstance.ForEachParameter([&](const VSTWrapper::ParameterInfo &pi) {
544 mParamNames.push_back(pi.mName);
545 return true;
546 } );
547
548 mTimer = std::make_unique<VSTTimer>(this);
549
550 wxTheApp->Bind(wxEVT_IDLE, &VSTEditor::OnIdle, this);
551}
552
553
554VSTInstance& VSTEditor::GetInstance() const

Callers

nothing calls this directly

Calls 6

GetSettingsFunction · 0.85
MakeMessageFSMethod · 0.80
BindMethod · 0.80
GetMethod · 0.45
ForEachParameterMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected