Audacity  3.0.3
LadspaEffect.cpp
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  LadspaEffect.cpp
6 
7  Dominic Mazzoni
8 
9  This class implements a LADSPA Plug-in effect.
10 
11 *******************************************************************//****************************************************************//*******************************************************************/
23 
24 
25 
26 #include "LadspaEffect.h" // This class's header file
27 
28 #include <float.h>
29 
30 #if !defined(__WXMSW__)
31 #include <dlfcn.h>
32 
33 #ifndef RTLD_DEEPBIND
34 #define RTLD_DEEPBIND 0
35 #endif
36 #endif
37 
38 #include <wx/setup.h> // for wxUSE_* macros
39 #include <wx/wxprec.h>
40 #include <wx/button.h>
41 #include <wx/checkbox.h>
42 #include <wx/dcclient.h>
43 #include <wx/filename.h>
44 #include <wx/log.h>
45 #include <wx/menu.h>
46 #include <wx/sizer.h>
47 #include <wx/slider.h>
48 #include <wx/statbox.h>
49 #include <wx/stattext.h>
50 #include <wx/textctrl.h>
51 #include <wx/tokenzr.h>
52 #include <wx/intl.h>
53 #include <wx/scrolwin.h>
54 #include <wx/version.h>
55 
56 #include "../../FileNames.h"
57 #include "../../ShuttleGui.h"
58 #include "../../widgets/NumericTextCtrl.h"
59 #include "../../widgets/valnum.h"
60 #include "../../widgets/wxPanelWrapper.h"
61 
62 #if wxUSE_ACCESSIBILITY
63 #include "../../widgets/WindowAccessible.h"
64 #endif
65 
66 // ============================================================================
67 // List of effects that ship with Audacity. These will be autoregistered.
68 // ============================================================================
69 const static wxChar *kShippedEffects[] =
70 {
71  wxT("sc4_1882.dll"),
72 };
73 
74 // ============================================================================
75 // Module registration entry point
76 //
77 // This is the symbol that Audacity looks for when the module is built as a
78 // dynamic library.
79 //
80 // When the module is builtin to Audacity, we use the same function, but it is
81 // declared static so as not to clash with other builtin modules.
82 // ============================================================================
83 DECLARE_MODULE_ENTRY(AudacityModule)
84 {
85  // Create and register the importer
86  // Trust the module manager not to leak this
87  return safenew LadspaEffectsModule(path);
88 }
89 
90 // ============================================================================
91 // Register this as a builtin module
92 // ============================================================================
93 DECLARE_BUILTIN_MODULE(LadspaBuiltin);
94 
96 //
97 // LadspaEffectsModule
98 //
100 
102 {
103  if (path)
104  {
105  mPath = *path;
106  }
107 }
108 
110 {
111 }
112 
113 // ============================================================================
114 // ComponentInterface implementation
115 // ============================================================================
116 
118 {
119  return mPath;
120 }
121 
123 {
124  /* i18n-hint: abbreviates "Linux Audio Developer's Simple Plugin API"
125  (Application programming interface)
126  */
127  return XO("LADSPA Effects");
128 }
129 
131 {
132  return XO("The Audacity Team");
133 }
134 
136 {
137  // This "may" be different if this were to be maintained as a separate DLL
138  return LADSPAEFFECTS_VERSION;
139 }
140 
142 {
143  return XO("Provides LADSPA Effects");
144 }
145 
146 // ============================================================================
147 // ModuleInterface implementation
148 // ============================================================================
149 
151 {
152  // Nothing to do here
153  return true;
154 }
155 
157 {
158  // Nothing to do here
159  return;
160 }
161 
163 {
164 #if USE_LADSPA
165  return LADSPAEFFECTS_FAMILY;
166 #else
167  return {};
168 #endif
169 }
170 
172 {
173  static FileExtensions result{{
174 
175 #ifdef __WXMSW__
176 
177  _T("dll")
178 
179 #else
180 
181  _T("so")
182 
183  #ifdef __WXMAC__
184  // Is it correct that these are candidate plug-in files too for macOs?
185  , _T("dylib")
186  #endif
187 
188 #endif
189 
190  }};
191  return result;
192 }
193 
195 {
196  // To do: better choice
197  return FileNames::PlugInDir();
198 }
199 
201 {
202  // Autoregister effects that we "think" are ones that have been shipped with
203  // Audacity. A little simplistic, but it should suffice for now.
204  auto pathList = GetSearchPaths();
205  FilePaths files;
206  TranslatableString ignoredErrMsg;
207 
208  for (int i = 0; i < (int)WXSIZEOF(kShippedEffects); i++)
209  {
210  files.clear();
211  pm.FindFilesInPathList(kShippedEffects[i], pathList, files);
212  for (size_t j = 0, cnt = files.size(); j < cnt; j++)
213  {
214  if (!pm.IsPluginRegistered(files[j]))
215  {
216  // No checking for error ?
217  DiscoverPluginsAtPath(files[j], ignoredErrMsg,
219  }
220  }
221  }
222 
223  // We still want to be called during the normal registration process
224  return false;
225 }
226 
228 {
229  auto pathList = GetSearchPaths();
230  FilePaths files;
231 
232 #if defined(__WXMAC__)
233 
234  // Recursively scan for all shared objects
235  pm.FindFilesInPathList(wxT("*.so"), pathList, files, true);
236 
237 #elif defined(__WXMSW__)
238 
239  // Recursively scan for all DLLs
240  pm.FindFilesInPathList(wxT("*.dll"), pathList, files, true);
241 
242 #else
243 
244  // Recursively scan for all shared objects
245  pm.FindFilesInPathList(wxT("*.so"), pathList, files, true);
246 
247 #endif
248 
249  return { files.begin(), files.end() };
250 }
251 
253  const PluginPath & path, TranslatableString &errMsg,
254  const RegistrationCallback &callback)
255 {
256  errMsg = {};
257  // Since we now have builtin VST support, ignore the VST bridge as it
258  // causes duplicate menu entries to appear.
259  wxFileName ff(path);
260  if (ff.GetName().CmpNoCase(wxT("vst-bridge")) == 0) {
261  errMsg = XO("Audacity no longer uses vst-bridge");
262  return 0;
263  }
264 
265  // As a courtesy to some plug-ins that might be bridges to
266  // open other plug-ins, we set the current working
267  // directory to be the plug-in's directory.
268  wxString envpath;
269  bool hadpath = wxGetEnv(wxT("PATH"), &envpath);
270  wxSetEnv(wxT("PATH"), ff.GetPath() + wxFILE_SEP_PATH + envpath);
271  wxString saveOldCWD = ff.GetCwd();
272  ff.SetCwd();
273 
274  int index = 0;
275  int nLoaded = 0;
276  LADSPA_Descriptor_Function mainFn = NULL;
277 #if defined(__WXMSW__)
278  wxDynamicLibrary lib;
279  if (lib.Load(path, wxDL_NOW)) {
280  wxLogNull logNo;
281 
282  mainFn = (LADSPA_Descriptor_Function) lib.GetSymbol(wxT("ladspa_descriptor"));
283 #else
284  void *lib = dlopen((const char *)path.ToUTF8(), RTLD_NOW | RTLD_LOCAL | RTLD_DEEPBIND);
285  if (lib) {
286  mainFn = (LADSPA_Descriptor_Function) dlsym(lib, "ladspa_descriptor");
287 #endif
288 
289  if (mainFn) {
290  const LADSPA_Descriptor *data;
291 
292  for (data = mainFn(index); data; data = mainFn(++index)) {
293  LadspaEffect effect(path, index);
294  if (effect.SetHost(NULL)) {
295  ++nLoaded;
296  if (callback)
297  callback( this, &effect );
298  }
299  else
300  errMsg = XO("Could not load the library");
301  }
302  }
303  }
304  else
305  errMsg = XO("Could not load the library");
306 
307 #if defined(__WXMSW__)
308  if (lib.IsLoaded()) {
309  // PRL: I suspect Bug1257 -- Crash when enabling Amplio2 -- is the fault of a timing-
310  // dependent multi-threading bug in the Amplio2 library itself, in case the unload of the .dll
311  // comes too soon after the load. I saw the bug in Release builds but not Debug.
312  // A sleep of even 1 ms was enough to fix the problem for me, but let's be even more generous.
313  ::wxMilliSleep(10);
314  lib.Unload();
315  }
316 #else
317  if (lib) {
318  dlclose(lib);
319  }
320 #endif
321 
322  wxSetWorkingDirectory(saveOldCWD);
323  hadpath ? wxSetEnv(wxT("PATH"), envpath) : wxUnsetEnv(wxT("PATH"));
324 
325  return nLoaded;
326 }
327 
328 bool LadspaEffectsModule::IsPluginValid(const PluginPath & path, bool bFast)
329 {
330  if( bFast )
331  return true;
332  wxString realPath = path.BeforeFirst(wxT(';'));
333  return wxFileName::FileExists(realPath);
334 }
335 
337 {
338  // Acquires a resource for the application.
339  // For us, the path is two words.
340  // 1) The library's path
341  // 2) The LADSPA descriptor index
342  long index;
343  wxString realPath = path.BeforeFirst(wxT(';'));
344  path.AfterFirst(wxT(';')).ToLong(&index);
345 
346  // Safety of this depends on complementary calls to DeleteInstance on the module manager side.
347  return safenew LadspaEffect(realPath, (int)index);
348 }
349 
351 {
352  std::unique_ptr < LadspaEffect > {
353  dynamic_cast<LadspaEffect *>(instance)
354  };
355 }
356 
358 {
359  FilePaths pathList;
360  wxString pathVar;
361 
362  // Check for the LADSPA_PATH environment variable
363  pathVar = wxString::FromUTF8(getenv("LADSPA_PATH"));
364  if (!pathVar.empty())
365  {
366  wxStringTokenizer tok(pathVar, wxPATH_SEP);
367  while (tok.HasMoreTokens())
368  {
369  pathList.push_back(tok.GetNextToken());
370  }
371  }
372 
373 #if defined(__WXMAC__)
374 #define LADSPAPATH wxT("/Library/Audio/Plug-Ins/LADSPA")
375 
376  // Look in ~/Library/Audio/Plug-Ins/LADSPA and /Library/Audio/Plug-Ins/LADSPA
377  pathList.push_back(wxGetHomeDir() + wxFILE_SEP_PATH + LADSPAPATH);
378  pathList.push_back(LADSPAPATH);
379 
380 #elif defined(__WXMSW__)
381 
382  // No special paths...probably should look in %CommonProgramFiles%\LADSPA
383 
384 #else
385 
386  pathList.push_back(wxGetHomeDir() + wxFILE_SEP_PATH + wxT(".ladspa"));
387 #if defined(__LP64__)
388  pathList.push_back(wxT("/usr/local/lib64/ladspa"));
389  pathList.push_back(wxT("/usr/lib64/ladspa"));
390 #endif
391  pathList.push_back(wxT("/usr/local/lib/ladspa"));
392  pathList.push_back(wxT("/usr/lib/ladspa"));
393  pathList.push_back(wxT(LIBDIR) wxT("/ladspa"));
394 
395 #endif
396 
397  return pathList;
398 }
399 
401 //
402 // LadspaEffectOptionsDialog
403 //
405 
407 {
408 public:
409  LadspaEffectOptionsDialog(wxWindow * parent, EffectHostInterface *host);
410  virtual ~LadspaEffectOptionsDialog();
411 
412  void PopulateOrExchange(ShuttleGui & S);
413 
414  void OnOk(wxCommandEvent & evt);
415 
416 private:
419 
420  DECLARE_EVENT_TABLE()
421 };
422 
423 BEGIN_EVENT_TABLE(LadspaEffectOptionsDialog, wxDialogWrapper)
426 
428 : wxDialogWrapper(parent, wxID_ANY, XO("LADSPA Effect Options"))
429 {
430  mHost = host;
431 
432  mHost->GetSharedConfig(wxT("Options"), wxT("UseLatency"), mUseLatency, true);
433 
434  ShuttleGui S(this, eIsCreating);
435  PopulateOrExchange(S);
436 }
437 
439 {
440 }
441 
443 {
444  S.SetBorder(5);
445  S.StartHorizontalLay(wxEXPAND, 1);
446  {
447  S.StartVerticalLay(false);
448  {
449  S.StartStatic(XO("Latency Compensation"));
450  {
451  S.AddVariableText( XO(
452 "As part of their processing, some LADSPA effects must delay returning "
453 "audio to Audacity. When not compensating for this delay, you will "
454 "notice that small silences have been inserted into the audio. "
455 "Enabling this option will provide that compensation, but it may "
456 "not work for all LADSPA effects."),
457  false, 0, 650);
458 
459  S.StartHorizontalLay(wxALIGN_LEFT);
460  {
461  S.TieCheckBox(XXO("Enable &compensation"),
462  mUseLatency);
463  }
464  S.EndHorizontalLay();
465  }
466  S.EndStatic();
467  }
468  S.EndVerticalLay();
469  }
470  S.EndHorizontalLay();
471 
472  S.AddStandardButtons();
473 
474  Layout();
475  Fit();
476  Center();
477 }
478 
479 void LadspaEffectOptionsDialog::OnOk(wxCommandEvent & WXUNUSED(evt))
480 {
481  if (!Validate())
482  {
483  return;
484  }
485 
487  PopulateOrExchange(S);
488 
489  mHost->SetSharedConfig(wxT("Options"), wxT("UseLatency"), mUseLatency);
490 
491  EndModal(wxID_OK);
492 }
493 
494 enum
495 {
496  ID_Duration = 20000,
497  ID_Toggles = 21000,
498  ID_Sliders = 22000,
499  ID_Texts = 23000,
500 };
501 
503 //
504 // LadspaEffectMeter
505 //
507 
508 class LadspaEffectMeter final : public wxWindow
509 {
510 public:
511  LadspaEffectMeter(wxWindow *parent, const float & val, float min, float max);
512  virtual ~LadspaEffectMeter();
513 
514 private:
515  void OnErase(wxEraseEvent & evt);
516  void OnPaint(wxPaintEvent & evt);
517  void OnIdle(wxIdleEvent & evt);
518  void OnSize(wxSizeEvent & evt);
519 
520 private:
521  const float & mVal;
522  float mMin;
523  float mMax;
524  float mLastValue;
525 
526  DECLARE_EVENT_TABLE()
527 };
528 
529 BEGIN_EVENT_TABLE(LadspaEffectMeter, wxWindow)
530  EVT_IDLE(LadspaEffectMeter::OnIdle)
531  EVT_ERASE_BACKGROUND(LadspaEffectMeter::OnErase)
532  EVT_PAINT(LadspaEffectMeter::OnPaint)
533  EVT_SIZE(LadspaEffectMeter::OnSize)
535 
536 LadspaEffectMeter::LadspaEffectMeter(wxWindow *parent, const float & val, float min, float max)
537 : wxWindow(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDEFAULT_CONTROL_BORDER),
538  mVal(val)
539 {
540  mMin = min;
541  mMax = max;
542  mLastValue = -mVal;
543 
544  SetBackgroundColour(*wxWHITE);
545 }
546 
548 {
549 }
550 
551 void LadspaEffectMeter::OnIdle(wxIdleEvent &evt)
552 {
553  evt.Skip();
554  if (mLastValue != mVal)
555  {
556  Refresh(false);
557  }
558 }
559 
560 void LadspaEffectMeter::OnErase(wxEraseEvent & WXUNUSED(evt))
561 {
562  // Just ignore it to prevent flashing
563 }
564 
565 void LadspaEffectMeter::OnPaint(wxPaintEvent & WXUNUSED(evt))
566 {
567  wxPaintDC dc(this);
568 
569  // Cache some metrics
570  wxRect r = GetClientRect();
571  wxCoord x = r.GetLeft();
572  wxCoord y = r.GetTop();
573  wxCoord w = r.GetWidth();
574  wxCoord h = r.GetHeight();
575 
576  // These use unscaled value, min, and max
577  float val = mVal;
578  if (val > mMax)
579  {
580  val = mMax;
581  }
582  if (val < mMin)
583  {
584  val = mMin;
585  }
586  val -= mMin;
587 
588  // Setup for erasing the background
589  dc.SetPen(*wxTRANSPARENT_PEN);
590  dc.SetBrush(wxColour(100, 100, 220));
591 
592  dc.Clear();
593  dc.DrawRectangle(x, y, (w * (val / fabs(mMax - mMin))), h);
594 
595  mLastValue = mVal;
596 }
597 
598 void LadspaEffectMeter::OnSize(wxSizeEvent & WXUNUSED(evt))
599 {
600  Refresh(false);
601 }
602 
604 //
605 // LadspaEffect
606 //
608 
609 BEGIN_EVENT_TABLE(LadspaEffect, wxEvtHandler)
610  EVT_COMMAND_RANGE(ID_Toggles, ID_Toggles + 999, wxEVT_COMMAND_CHECKBOX_CLICKED, LadspaEffect::OnCheckBox)
611  EVT_COMMAND_RANGE(ID_Sliders, ID_Sliders + 999, wxEVT_COMMAND_SLIDER_UPDATED, LadspaEffect::OnSlider)
614 
615 LadspaEffect::LadspaEffect(const wxString & path, int index)
616 {
617  mPath = path;
618  mIndex = index;
619  mData = NULL;
620 
621  mHost = NULL;
622  mMaster = NULL;
623  mReady = false;
624 
625  mInteractive = false;
626 
627  mAudioIns = 0;
628  mAudioOuts = 0;
629  mNumInputControls = 0;
630  mNumOutputControls = 0;
631  mSampleRate = 44100;
632  mBlockSize = 0;
633 
634  mLatencyPort = -1;
635 
636  mDialog = NULL;
637  mParent = NULL;
638 }
639 
641 {
642 }
643 
644 // ============================================================================
645 // ComponentInterface implementation
646 // ============================================================================
647 
649 {
650  return wxString::Format(wxT("%s;%d"), mPath, mIndex);
651 }
652 
654 {
655  return LAT1CTOWX(mData->Name);
656 }
657 
659 {
660  return { LAT1CTOWX(mData->Maker) };
661 }
662 
664 {
665  return _("n/a");
666 }
667 
669 {
670  return Verbatim( LAT1CTOWX(mData->Copyright) );
671 }
672 
673 // ============================================================================
674 // EffectDefinitionInterface implementation
675 // ============================================================================
676 
678 {
679  if (mAudioIns == 0 && mAudioOuts == 0)
680  {
681  return EffectTypeTool;
682  }
683 
684  if (mAudioIns == 0)
685  {
686  return EffectTypeGenerate;
687  }
688 
689  if (mAudioOuts == 0)
690  {
691  return EffectTypeAnalyze;
692  }
693 
694  return EffectTypeProcess;
695 }
696 
698 {
699  return LADSPAEFFECTS_FAMILY;
700 }
701 
703 {
704  return mInteractive;
705 }
706 
708 {
709  return false;
710 }
711 
713 {
714  return false;
715 }
716 
718 {
719  return GetType() != EffectTypeGenerate;
720 }
721 
723 {
724  return mNumInputControls > 0;
725 }
726 
727 // ============================================================================
728 // EffectClientInterface Implementation
729 // ============================================================================
730 
732 {
733  mHost = host;
734 
735  if (!Load())
736  {
737  return false;
738  }
739 
740  mInputPorts.reinit( mData->PortCount );
741  mOutputPorts.reinit( mData->PortCount );
742  mInputControls.reinit( mData->PortCount );
743  mOutputControls.reinit( mData->PortCount );
744 
745  for (unsigned long p = 0; p < mData->PortCount; p++)
746  {
747  LADSPA_PortDescriptor d = mData->PortDescriptors[p];
748 
749  // Collect the audio ports
750  if (LADSPA_IS_PORT_AUDIO(d))
751  {
752  if (LADSPA_IS_PORT_INPUT(d))
753  {
754  mInputPorts[mAudioIns++] = p;
755  }
756  else if (LADSPA_IS_PORT_OUTPUT(d))
757  {
758  mOutputPorts[mAudioOuts++] = p;
759  }
760  }
761  // Determine the port's default value
763  {
764  mInteractive = true;
765 
766  LADSPA_PortRangeHint hint = mData->PortRangeHints[p];
767  float val = float(1.0);
768  float lower = hint.LowerBound;
769  float upper = hint.UpperBound;
770 
772  {
773  lower *= mSampleRate;
774  upper *= mSampleRate;
775  }
776 
777  if (LADSPA_IS_HINT_BOUNDED_BELOW(hint.HintDescriptor) && val < lower)
778  {
779  val = lower;
780  }
781 
782  if (LADSPA_IS_HINT_BOUNDED_ABOVE(hint.HintDescriptor) && val > upper)
783  {
784  val = upper;
785  }
786 
788  {
789  val = lower;
790  }
791 
793  {
794  val = upper;
795  }
796 
798  {
800  {
801  val = exp(log(lower) * 0.75f + log(upper) * 0.25f);
802  }
803  else
804  {
805  val = lower * 0.75f + upper * 0.25f;
806  }
807  }
808 
810  {
812  {
813  val = exp(log(lower) * 0.5f + log(upper) * 0.5f);
814  }
815  else
816  {
817  val = lower * 0.5f + upper * 0.5f;
818  }
819  }
820 
822  {
824  {
825  val = exp(log(lower) * 0.25f + log(upper) * 0.75f);
826  }
827  else
828  {
829  val = lower * 0.25f + upper * 0.75f;
830  }
831  }
832 
834  {
835  val = 0.0f;
836  }
837 
839  {
840  val = 1.0f;
841  }
842 
844  {
845  val = 100.0f;
846  }
847 
849  {
850  val = 440.0f;
851  }
852 
853  mNumInputControls++;
854  mInputControls[p] = val;
855  }
857  {
858  mOutputControls[p] = 0.0;
859 
860  // LADSPA effects have a convention of providing latency on an output
861  // control port whose name is "latency".
862  if (strcmp(mData->PortNames[p], "latency") == 0)
863  {
864  mLatencyPort = p;
865  }
866  else
867  {
868  mInteractive = true;
869  mNumOutputControls++;
870  }
871  }
872  }
873 
874  // mHost will be null during registration
875  if (mHost)
876  {
877  mHost->GetSharedConfig(wxT("Options"), wxT("UseLatency"), mUseLatency, true);
878 
879  bool haveDefaults;
880  mHost->GetPrivateConfig(mHost->GetFactoryDefaultsGroup(), wxT("Initialized"), haveDefaults, false);
881  if (!haveDefaults)
882  {
883  SaveParameters(mHost->GetFactoryDefaultsGroup());
884  mHost->SetPrivateConfig(mHost->GetFactoryDefaultsGroup(), wxT("Initialized"), true);
885  }
886 
887  LoadParameters(mHost->GetCurrentSettingsGroup());
888  }
889 
890  return true;
891 }
892 
894 {
895  return mAudioIns;
896 }
897 
899 {
900  return mAudioOuts;
901 }
902 
904 {
905  return 0;
906 }
907 
909 {
910  return 0;
911 }
912 
914 {
915  mSampleRate = rate;
916 }
917 
918 size_t LadspaEffect::SetBlockSize(size_t maxBlockSize)
919 {
920  mBlockSize = maxBlockSize;
921 
922  return mBlockSize;
923 }
924 
926 {
927  return mBlockSize;
928 }
929 
931 {
932  if (mUseLatency && mLatencyPort >= 0 && !mLatencyDone)
933  {
934  mLatencyDone = true;
935  return sampleCount ( mOutputControls[mLatencyPort] );
936  }
937 
938  return 0;
939 }
940 
942 {
943  return 0;
944 }
945 
947 {
948  return mReady;
949 }
950 
951 bool LadspaEffect::ProcessInitialize(sampleCount WXUNUSED(totalLen), ChannelNames WXUNUSED(chanMap))
952 {
953  /* Instantiate the plugin */
954  if (!mReady)
955  {
956  mMaster = InitInstance(mSampleRate);
957  if (!mMaster)
958  {
959  return false;
960  }
961  mReady = true;
962  }
963 
964  mLatencyDone = false;
965 
966  return true;
967 }
968 
970 {
971  if (mReady)
972  {
973  mReady = false;
974 
975  FreeInstance(mMaster);
976  mMaster = NULL;
977  }
978 
979  return true;
980 }
981 
982 size_t LadspaEffect::ProcessBlock(float **inBlock, float **outBlock, size_t blockLen)
983 {
984  for (int i = 0; i < (int)mAudioIns; i++)
985  {
986  mData->connect_port(mMaster, mInputPorts[i], inBlock[i]);
987  }
988 
989  for (int i = 0; i < (int)mAudioOuts; i++)
990  {
991  mData->connect_port(mMaster, mOutputPorts[i], outBlock[i]);
992  }
993 
994  mData->run(mMaster, blockLen);
995 
996  RefreshControls(true);
997 
998  return blockLen;
999 }
1000 
1002 {
1003  return true;
1004 }
1005 
1006 bool LadspaEffect::RealtimeAddProcessor(unsigned WXUNUSED(numChannels), float sampleRate)
1007 {
1008  LADSPA_Handle slave = InitInstance(sampleRate);
1009  if (!slave)
1010  {
1011  return false;
1012  }
1013 
1014  mSlaves.push_back(slave);
1015 
1016  return true;
1017 }
1018 
1020 {
1021  for (size_t i = 0, cnt = mSlaves.size(); i < cnt; i++)
1022  {
1023  FreeInstance(mSlaves[i]);
1024  }
1025  mSlaves.clear();
1026 
1027  return true;
1028 }
1029 
1031 {
1032  return true;
1033 }
1034 
1036 {
1037  return true;
1038 }
1039 
1041 {
1042  return true;
1043 }
1044 
1046  float **inbuf,
1047  float **outbuf,
1048  size_t numSamples)
1049 {
1050  for (int i = 0; i < (int)mAudioIns; i++)
1051  {
1052  mData->connect_port(mSlaves[group], mInputPorts[i], inbuf[i]);
1053  }
1054 
1055  for (int i = 0; i < (int)mAudioOuts; i++)
1056  {
1057  mData->connect_port(mSlaves[group], mOutputPorts[i], outbuf[i]);
1058  }
1059 
1060  mData->run(mSlaves[group], numSamples);
1061 
1062  return numSamples;
1063 }
1064 
1066 {
1067  return true;
1068 }
1069 
1071  wxWindow &parent, const EffectDialogFactory &factory, bool forceModal)
1072 {
1073  if (mDialog)
1074  {
1075  if ( mDialog->Close(true) )
1076  mDialog = nullptr;
1077  return false;
1078  }
1079 
1080  // mDialog is null
1081  auto cleanup = valueRestorer( mDialog );
1082 
1083  if ( factory )
1084  mDialog = factory(parent, mHost, this);
1085  if (!mDialog)
1086  {
1087  return false;
1088  }
1089 
1090  mDialog->Layout();
1091  mDialog->Fit();
1092  mDialog->SetMinSize(mDialog->GetSize());
1093 
1094  if ((SupportsRealtime() || GetType() == EffectTypeAnalyze) && !forceModal)
1095  {
1096  mDialog->Show();
1097  cleanup.release();
1098 
1099  return false;
1100  }
1101 
1102  bool res = mDialog->ShowModal() != 0;
1103 
1104  return res;
1105 }
1106 
1108 {
1109  for (unsigned long p = 0; p < mData->PortCount; p++)
1110  {
1111  LADSPA_PortDescriptor d = mData->PortDescriptors[p];
1112 
1114  {
1115  if (!parms.Write(LAT1CTOWX(mData->PortNames[p]), mInputControls[p]))
1116  {
1117  return false;
1118  }
1119  }
1120  }
1121 
1122  return true;
1123 }
1124 
1126 {
1127  for (unsigned long p = 0; p < mData->PortCount; p++)
1128  {
1129  LADSPA_PortDescriptor descriptor = mData->PortDescriptors[p];
1130 
1131  if (LADSPA_IS_PORT_CONTROL(descriptor) && LADSPA_IS_PORT_INPUT(descriptor))
1132  {
1133  wxString labelText = LAT1CTOWX(mData->PortNames[p]);
1134  double d = 0.0;
1135  if (!parms.Read(labelText, &d))
1136  {
1137  return false;
1138  }
1139 
1140  mInputControls[p] = d;
1141  }
1142  }
1143 
1144  return true;
1145 }
1146 
1148 {
1149  if (!LoadParameters(name))
1150  {
1151  return false;
1152  }
1153 
1154  RefreshControls();
1155 
1156  return true;
1157 }
1158 
1160 {
1161  return SaveParameters(name);
1162 }
1163 
1165 {
1166  return {};
1167 }
1168 
1169 bool LadspaEffect::LoadFactoryPreset(int WXUNUSED(id))
1170 {
1171  return true;
1172 }
1173 
1175 {
1176  if (!LoadParameters(mHost->GetFactoryDefaultsGroup()))
1177  {
1178  return false;
1179  }
1180 
1181  RefreshControls();
1182 
1183  return true;
1184 }
1185 
1186 // ============================================================================
1187 // EffectUIClientInterface Implementation
1188 // ============================================================================
1189 
1191 {
1192  mUIHost = host;
1193 }
1194 
1196 {
1197  auto parent = S.GetParent();
1198 
1199  mParent = parent;
1200 
1201  mParent->PushEventHandler(this);
1202 
1203  mToggles.reinit( mData->PortCount );
1204  mSliders.reinit( mData->PortCount );
1205  mFields.reinit( mData->PortCount, true);
1206  mLabels.reinit( mData->PortCount );
1207  mMeters.reinit( mData->PortCount );
1208 
1209  wxASSERT(mParent); // To justify safenew
1210  wxScrolledWindow *const w = safenew wxScrolledWindow(mParent,
1211  wxID_ANY,
1212  wxDefaultPosition,
1213  wxDefaultSize,
1214  wxVSCROLL | wxTAB_TRAVERSAL);
1215 
1216  {
1217  auto mainSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
1218  w->SetScrollRate(0, 20);
1219 
1220  // This fools NVDA into not saying "Panel" when the dialog gets focus
1221  w->SetName(wxT("\a"));
1222  w->SetLabel(wxT("\a"));
1223 
1224  mainSizer->Add(w, 1, wxEXPAND);
1225  mParent->SetSizer(mainSizer.release());
1226  }
1227 
1228  wxSizer *marginSizer;
1229  {
1230  auto uMarginSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
1231  marginSizer = uMarginSizer.get();
1232 
1233  if (mNumInputControls)
1234  {
1235  auto paramSizer = std::make_unique<wxStaticBoxSizer>(wxVERTICAL, w, _("Effect Settings"));
1236 
1237  auto gridSizer = std::make_unique<wxFlexGridSizer>(5, 0, 0);
1238  gridSizer->AddGrowableCol(3);
1239 
1240  wxControl *item;
1241 
1242  // Add the duration control for generators
1243  if (GetType() == EffectTypeGenerate)
1244  {
1245  item = safenew wxStaticText(w, 0, _("Duration:"));
1246  gridSizer->Add(item, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 5);
1247  mDuration = safenew
1250  mHost->GetDurationFormat(),
1251  mHost->GetDuration(),
1252  mSampleRate,
1254  .AutoPos(true));
1255  mDuration->SetName( XO("Duration") );
1256  gridSizer->Add(mDuration, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
1257  gridSizer->Add(1, 1, 0);
1258  gridSizer->Add(1, 1, 0);
1259  gridSizer->Add(1, 1, 0);
1260  }
1261 
1262  for (unsigned long p = 0; p < mData->PortCount; p++)
1263  {
1264  LADSPA_PortDescriptor d = mData->PortDescriptors[p];
1266  {
1267  continue;
1268  }
1269 
1270  wxString labelText = LAT1CTOWX(mData->PortNames[p]);
1271  item = safenew wxStaticText(w, 0, wxString::Format(_("%s:"), labelText));
1272  gridSizer->Add(item, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 5);
1273 
1274  wxString fieldText;
1275  LADSPA_PortRangeHint hint = mData->PortRangeHints[p];
1276 
1278  {
1279  mToggles[p] = safenew wxCheckBox(w, ID_Toggles + p, wxT(""));
1280  mToggles[p]->SetName(labelText);
1281  mToggles[p]->SetValue(mInputControls[p] > 0);
1282  gridSizer->Add(mToggles[p], 0, wxALL, 5);
1283 
1284  gridSizer->Add(1, 1, 0);
1285  gridSizer->Add(1, 1, 0);
1286  gridSizer->Add(1, 1, 0);
1287  continue;
1288  }
1289 
1290  wxString bound;
1291  float lower = -FLT_MAX;
1292  float upper = FLT_MAX;
1293  bool haslo = false;
1294  bool hashi = false;
1295  bool forceint = false;
1296 
1298  {
1299  lower = hint.LowerBound;
1300  haslo = true;
1301  }
1302 
1304  {
1305  upper = hint.UpperBound;
1306  hashi = true;
1307  }
1308 
1310  {
1311  lower *= mSampleRate;
1312  upper *= mSampleRate;
1313  forceint = true;
1314  }
1315 
1316  // Limit to the UI precision
1317  lower = ceilf(lower * 1000000.0) / 1000000.0;
1318  upper = floorf(upper * 1000000.0) / 1000000.0;
1319  mInputControls[p] = roundf(mInputControls[p] * 1000000.0) / 1000000.0;
1320 
1321  if (haslo && mInputControls[p] < lower)
1322  {
1323  mInputControls[p] = lower;
1324  }
1325 
1326  if (hashi && mInputControls[p] > upper)
1327  {
1328  mInputControls[p] = lower;
1329  }
1330 
1331  // Don't specify a value at creation time. This prevents unwanted events
1332  // being sent to the OnTextCtrl() handler before the associated slider
1333  // has been created.
1334  mFields[p] = safenew wxTextCtrl(w, ID_Texts + p);
1335  mFields[p]->SetName(labelText);
1336  gridSizer->Add(mFields[p], 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
1337 
1338  wxString str;
1339  if (haslo)
1340  {
1341  if (LADSPA_IS_HINT_INTEGER(hint.HintDescriptor) || forceint)
1342  {
1343  str.Printf(wxT("%d"), (int)(lower + 0.5));
1344  }
1345  else
1346  {
1347  str = Internat::ToDisplayString(lower);
1348  }
1349  item = safenew wxStaticText(w, 0, str);
1350  gridSizer->Add(item, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 5);
1351  }
1352  else
1353  {
1354  gridSizer->Add(1, 1, 0);
1355  }
1356 
1357  mSliders[p] = safenew wxSliderWrapper(w, ID_Sliders + p,
1358  0, 0, 1000,
1359  wxDefaultPosition,
1360  wxSize(200, -1));
1361 #if wxUSE_ACCESSIBILITY
1362  // so that name can be set on a standard control
1363  mSliders[p]->SetAccessible(safenew WindowAccessible(mSliders[p]));
1364 #endif
1365  mSliders[p]->SetName(labelText);
1366  gridSizer->Add(mSliders[p], 0, wxALIGN_CENTER_VERTICAL | wxEXPAND | wxALL, 5);
1367 
1368  if (hashi)
1369  {
1370  if (LADSPA_IS_HINT_INTEGER(hint.HintDescriptor) || forceint)
1371  {
1372  str.Printf(wxT("%d"), (int)(upper + 0.5));
1373  }
1374  else
1375  {
1376  str = Internat::ToDisplayString(upper);
1377  }
1378  item = safenew wxStaticText(w, 0, str);
1379  gridSizer->Add(item, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxALL, 5);
1380  }
1381  else
1382  {
1383  gridSizer->Add(1, 1, 0);
1384  }
1385 
1386  if (LADSPA_IS_HINT_INTEGER(hint.HintDescriptor) || forceint)
1387  {
1388  fieldText.Printf(wxT("%d"), (int)(mInputControls[p] + 0.5));
1389 
1390  IntegerValidator<float> vld(&mInputControls[p]);
1391  vld.SetRange(haslo ? lower : INT_MIN,
1392  hashi ? upper : INT_MAX);
1393  mFields[p]->SetValidator(vld);
1394  }
1395  else
1396  {
1397  fieldText = Internat::ToDisplayString(mInputControls[p]);
1398 
1399  // > 12 decimal places can cause rounding errors in display.
1400  FloatingPointValidator<float> vld(6, &mInputControls[p]);
1401  vld.SetRange(lower, upper);
1402 
1403  // Set number of decimal places
1404  if (upper - lower < 10.0)
1405  {
1406  vld.SetStyle(NumValidatorStyle::THREE_TRAILING_ZEROES);
1407  }
1408  else if (upper - lower < 100.0)
1409  {
1410  vld.SetStyle(NumValidatorStyle::TWO_TRAILING_ZEROES);
1411  }
1412  else
1413  {
1414  vld.SetStyle(NumValidatorStyle::ONE_TRAILING_ZERO);
1415  }
1416 
1417  mFields[p]->SetValidator(vld);
1418  }
1419 
1420  // Set the textctrl value. This will trigger an event so OnTextCtrl()
1421  // can update the slider.
1422  mFields[p]->SetValue(fieldText);
1423  }
1424 
1425  paramSizer->Add(gridSizer.release(), 0, wxEXPAND | wxALL, 5);
1426  marginSizer->Add(paramSizer.release(), 0, wxEXPAND | wxALL, 5);
1427  }
1428 
1429  if (mNumOutputControls > 0)
1430  {
1431  auto paramSizer = std::make_unique<wxStaticBoxSizer>(wxVERTICAL, w, _("Effect Output"));
1432 
1433  auto gridSizer = std::make_unique<wxFlexGridSizer>(2, 0, 0);
1434  gridSizer->AddGrowableCol(1);
1435 
1436  wxControl *item;
1437 
1438  for (unsigned long p = 0; p < mData->PortCount; p++)
1439  {
1440  LADSPA_PortDescriptor d = mData->PortDescriptors[p];
1442  {
1443  continue;
1444  }
1445 
1446  wxString labelText = LAT1CTOWX(mData->PortNames[p]);
1447  item = safenew wxStaticText(w, 0, wxString::Format(_("%s:"), labelText));
1448  gridSizer->Add(item, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 5);
1449 
1450  //LADSPA_PortRangeHint hint = mData->PortRangeHints[p];
1451 
1452  wxString bound;
1453  float lower = 0.0;
1454  float upper = 1.0;
1455 
1456  /*
1457  bool haslo = false;
1458  bool hashi = false;
1459  bool forceint = false;
1460 
1461  if (LADSPA_IS_HINT_BOUNDED_BELOW(hint.HintDescriptor))
1462  {
1463  lower = hint.LowerBound;
1464  haslo = true;
1465  }
1466 
1467  if (LADSPA_IS_HINT_BOUNDED_ABOVE(hint.HintDescriptor))
1468  {
1469  upper = hint.UpperBound;
1470  hashi = true;
1471  }
1472 
1473  if (LADSPA_IS_HINT_SAMPLE_RATE(hint.HintDescriptor))
1474  {
1475  lower *= mSampleRate;
1476  upper *= mSampleRate;
1477  forceint = true;
1478  }
1479  */
1480 
1481  // Limit to the UI precision
1482  lower = ceilf(lower * 1000000.0) / 1000000.0;
1483  upper = floorf(upper * 1000000.0) / 1000000.0;
1484  mInputControls[p] = roundf(mInputControls[p] * 1000000.0) / 1000000.0;
1485 
1486  mMeters[p] = safenew LadspaEffectMeter(w, mOutputControls[p], lower, upper);
1487  mMeters[p]->SetLabel(labelText); // for screen readers
1488  gridSizer->Add(mMeters[p], 1, wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL, 5);
1489  }
1490 
1491  paramSizer->Add(gridSizer.release(), 0, wxEXPAND | wxALL, 5);
1492  marginSizer->Add(paramSizer.release(), 0, wxEXPAND | wxALL, 5);
1493 
1494  RefreshControls(true);
1495  }
1496 
1497  w->SetSizer(uMarginSizer.release());
1498  }
1499 
1500  w->Layout();
1501 
1502  // Try to give the window a sensible default/minimum size
1503  wxSize sz1 = marginSizer->GetMinSize();
1504  wxSize sz2 = mParent->GetMinSize();
1505  w->SetMinSize( { std::min(sz1.x, sz2.x), std::min(sz1.y, sz2.y) } );
1506 
1507  // And let the parent reduce to the NEW minimum if possible
1508  mParent->SetMinSize({ -1, -1 });
1509 
1510  return true;
1511 }
1512 
1514 {
1515  return false;
1516 }
1517 
1519 {
1520  if (!mParent->Validate())
1521  {
1522  return false;
1523  }
1524 
1525  if (GetType() == EffectTypeGenerate)
1526  {
1527  mHost->SetDuration(mDuration->GetValue());
1528  }
1529 
1530  return true;
1531 }
1532 
1534 {
1535  return true;
1536 }
1537 
1539 {
1540  mParent->RemoveEventHandler(this);
1541 
1542  mToggles.reset();
1543  mSliders.reset();
1544  mFields.reset();
1545  mLabels.reset();
1546 
1547  mUIHost = NULL;
1548  mParent = NULL;
1549  mDialog = NULL;
1550 
1551  return true;
1552 }
1553 
1555 {
1556  return false;
1557 }
1558 
1560 {
1561 }
1562 
1564 {
1565 }
1566 
1568 {
1569  return true;
1570 }
1571 
1573 {
1574  LadspaEffectOptionsDialog dlg(mParent, mHost);
1575  if (dlg.ShowModal())
1576  {
1577  // Reinitialize configuration options
1578  mHost->GetSharedConfig(wxT("Options"), wxT("UseLatency"), mUseLatency, true);
1579  }
1580 }
1581 
1582 // ============================================================================
1583 // LadspaEffect Implementation
1584 // ============================================================================
1585 
1587 {
1588  if (mLib.IsLoaded())
1589  {
1590  return true;
1591  }
1592 
1593  wxFileName ff = mPath;
1594  wxString envpath;
1595  bool hadpath = wxGetEnv(wxT("PATH"), &envpath);
1596  wxSetEnv(wxT("PATH"), ff.GetPath() + wxFILE_SEP_PATH + envpath);
1597  wxString saveOldCWD = ff.GetCwd();
1598  ff.SetCwd();
1599 
1600  LADSPA_Descriptor_Function mainFn = NULL;
1601 
1602  if (mLib.Load(mPath, wxDL_NOW))
1603  {
1604  wxLogNull logNo;
1605 
1606  mainFn = (LADSPA_Descriptor_Function) mLib.GetSymbol(wxT("ladspa_descriptor"));
1607  if (mainFn)
1608  {
1609  mData = mainFn(mIndex);
1610  return true;
1611  }
1612  }
1613 
1614  if (mLib.IsLoaded())
1615  {
1616  mLib.Unload();
1617  }
1618 
1619  wxSetWorkingDirectory(saveOldCWD);
1620  hadpath ? wxSetEnv(wxT("PATH"), envpath) : wxUnsetEnv(wxT("PATH"));
1621 
1622  return false;
1623 }
1624 
1626 {
1627  if (mLib.IsLoaded())
1628  {
1629  mLib.Unload();
1630  }
1631 }
1632 
1634 {
1635  wxString parms;
1636  if (!mHost->GetPrivateConfig(group, wxT("Parameters"), parms, wxEmptyString))
1637  {
1638  return false;
1639  }
1640 
1641  CommandParameters eap;
1642  if (!eap.SetParameters(parms))
1643  {
1644  return false;
1645  }
1646 
1647  return SetAutomationParameters(eap);
1648 }
1649 
1651 {
1652  CommandParameters eap;
1653  if (!GetAutomationParameters(eap))
1654  {
1655  return false;
1656  }
1657 
1658  wxString parms;
1659  if (!eap.GetParameters(parms))
1660  {
1661  return false;
1662  }
1663 
1664  return mHost->SetPrivateConfig(group, wxT("Parameters"), parms);
1665 }
1666 
1668 {
1669  /* Instantiate the plugin */
1670  LADSPA_Handle handle = mData->instantiate(mData, sampleRate);
1671  if (!handle)
1672  {
1673  return NULL;
1674  }
1675 
1676  for (unsigned long p = 0; p < mData->PortCount; p++)
1677  {
1678  LADSPA_PortDescriptor d = mData->PortDescriptors[p];
1679  if (LADSPA_IS_PORT_CONTROL(d))
1680  {
1681  if (LADSPA_IS_PORT_INPUT(d))
1682  {
1683  mData->connect_port(handle, p, &mInputControls[p]);
1684  }
1685  else
1686  {
1687  mData->connect_port(handle, p, &mOutputControls[p]);
1688  }
1689  }
1690  }
1691 
1692  if (mData->activate)
1693  {
1694  mData->activate(handle);
1695  }
1696 
1697  return handle;
1698 }
1699 
1701 {
1702  if (mData->deactivate)
1703  {
1704  mData->deactivate(handle);
1705  }
1706 
1707  mData->cleanup(handle);
1708 }
1709 
1710 void LadspaEffect::OnCheckBox(wxCommandEvent & evt)
1711 {
1712  int p = evt.GetId() - ID_Toggles;
1713 
1714  mInputControls[p] = mToggles[p]->GetValue();
1715 }
1716 
1717 void LadspaEffect::OnSlider(wxCommandEvent & evt)
1718 {
1719  int p = evt.GetId() - ID_Sliders;
1720 
1721  float val;
1722  float lower = float(0.0);
1723  float upper = float(10.0);
1724  float range;
1725  bool forceint = false;
1726 
1727  LADSPA_PortRangeHint hint = mData->PortRangeHints[p];
1729  lower = hint.LowerBound;
1731  upper = hint.UpperBound;
1733  lower *= mSampleRate;
1734  upper *= mSampleRate;
1735  forceint = true;
1736  }
1737 
1738  range = upper - lower;
1739 
1740  val = (mSliders[p]->GetValue() / 1000.0) * range + lower;
1741 
1742  wxString str;
1743  if (LADSPA_IS_HINT_INTEGER(hint.HintDescriptor) || forceint)
1744  str.Printf(wxT("%d"), (int)(val + 0.5));
1745  else
1746  str = Internat::ToDisplayString(val);
1747 
1748  mFields[p]->SetValue(str);
1749 
1750  mInputControls[p] = val;
1751 }
1752 
1753 void LadspaEffect::OnTextCtrl(wxCommandEvent & evt)
1754 {
1755  LadspaEffect *that = this;
1756  int p = evt.GetId() - ID_Texts;
1757 
1758  float val;
1759  float lower = float(0.0);
1760  float upper = float(10.0);
1761  float range;
1762 
1763  val = Internat::CompatibleToDouble(that->mFields[p]->GetValue());
1764 
1765  LADSPA_PortRangeHint hint = that->mData->PortRangeHints[p];
1767  lower = hint.LowerBound;
1769  upper = hint.UpperBound;
1771  lower *= mSampleRate;
1772  upper *= mSampleRate;
1773  }
1774  range = upper - lower;
1775 
1776  if (val < lower)
1777  val = lower;
1778  if (val > upper)
1779  val = upper;
1780 
1781  mInputControls[p] = val;
1782 
1783  that->mSliders[p]->SetValue((int)(((val-lower)/range) * 1000.0 + 0.5));
1784 }
1785 
1786 void LadspaEffect::RefreshControls(bool outputOnly)
1787 {
1788  if (!mParent)
1789  {
1790  return;
1791  }
1792 
1793  for (unsigned long p = 0; p < mData->PortCount; p++)
1794  {
1795  LADSPA_PortDescriptor d = mData->PortDescriptors[p];
1796  if (!(LADSPA_IS_PORT_CONTROL(d)))
1797  {
1798  continue;
1799  }
1800 
1801  wxString fieldText;
1802  LADSPA_PortRangeHint hint = mData->PortRangeHints[p];
1803 
1804  bool forceint = false;
1806  {
1807  forceint = true;
1808  }
1809 
1810  if (LADSPA_IS_PORT_OUTPUT(d))
1811  {
1812  continue;
1813  }
1814 
1815  if (outputOnly)
1816  {
1817  continue;
1818  }
1819 
1821  {
1822  mToggles[p]->SetValue(mInputControls[p] > 0);
1823  continue;
1824  }
1825 
1826  if (LADSPA_IS_HINT_INTEGER(hint.HintDescriptor) || forceint)
1827  {
1828  fieldText.Printf(wxT("%d"), (int)(mInputControls[p] + 0.5));
1829  }
1830  else
1831  {
1832  fieldText = Internat::ToDisplayString(mInputControls[p]);
1833  }
1834 
1835  // Set the textctrl value. This will trigger an event so OnTextCtrl()
1836  // can update the slider.
1837  mFields[p]->SetValue(fieldText);
1838  }
1839 }
LadspaEffectsModule::Initialize
bool Initialize() override
Definition: LadspaEffect.cpp:150
LadspaEffect::GetBlockSize
size_t GetBlockSize() const override
Definition: LadspaEffect.cpp:925
EVT_BUTTON
EVT_BUTTON(wxID_NO, DependencyDialog::OnNo) EVT_BUTTON(wxID_YES
RegistryPaths
std::vector< RegistryPath > RegistryPaths
Definition: Types.h:262
FileNames::PlugInDir
FilePath PlugInDir()
The user plug-in directory (not a system one)
LadspaEffect::IsGraphicalUI
bool IsGraphicalUI() override
Definition: LadspaEffect.cpp:1513
LadspaEffect::FreeInstance
void FreeInstance(LADSPA_Handle handle)
Definition: LadspaEffect.cpp:1700
TranslatableString
Definition: Types.h:290
LadspaEffect::SetHost
bool SetHost(EffectHostInterface *host) override
Definition: LadspaEffect.cpp:731
CommandParameters
CommandParameters, derived from wxFileConfig, is essentially doing the same things as the Shuttle cla...
Definition: EffectAutomationParameters.h:67
eIsCreating
@ eIsCreating
Definition: ShuttleGui.h:36
CommandParameters::SetParameters
bool SetParameters(const wxString &parms)
Definition: EffectAutomationParameters.h:287
valueRestorer
ValueRestorer< T > valueRestorer(T &var)
inline functions provide convenient parameter type deduction
Definition: MemoryX.h:430
LadspaEffectMeter::OnErase
void OnErase(wxEraseEvent &evt)
Definition: LadspaEffect.cpp:560
LadspaEffect::~LadspaEffect
virtual ~LadspaEffect()
Definition: LadspaEffect.cpp:640
ShuttleGuiBase::StartVerticalLay
void StartVerticalLay(int iProp=1)
Definition: ShuttleGui.cpp:1177
LadspaEffectOptionsDialog
Definition: LadspaEffect.cpp:407
LadspaEffect::RefreshControls
void RefreshControls(bool outputOnly=false)
Definition: LadspaEffect.cpp:1786
EffectTypeProcess
@ EffectTypeProcess
Definition: EffectInterface.h:59
wxSliderWrapper
wxSlider wxSliderWrapper
Definition: ShuttleGui.h:103
PluginPaths
std::vector< PluginPath > PluginPaths
Definition: Types.h:258
NumericTextCtrl::Options::AutoPos
Options & AutoPos(bool enable)
Definition: NumericTextCtrl.h:187
eIsGettingFromDialog
@ eIsGettingFromDialog
Definition: ShuttleGui.h:37
LadspaEffect::InitInstance
LADSPA_Handle InitInstance(float sampleRate)
Definition: LadspaEffect.cpp:1667
EffectHostInterface
EffectHostInterface is a decorator of a EffectUIClientInterface. It adds virtual (abstract) functions...
Definition: EffectInterface.h:119
LadspaEffect::SaveUserPreset
bool SaveUserPreset(const RegistryPath &name) override
Definition: LadspaEffect.cpp:1159
LadspaEffectMeter::mMin
float mMin
Definition: LadspaEffect.cpp:522
ID_Texts
@ ID_Texts
Definition: LadspaEffect.cpp:499
LadspaEffect::RealtimeResume
bool RealtimeResume() override
Definition: LadspaEffect.cpp:1035
LADSPA_IS_HINT_INTEGER
#define LADSPA_IS_HINT_INTEGER(x)
Definition: ladspa.h:315
LadspaEffect::LoadFactoryDefaults
bool LoadFactoryDefaults() override
Definition: LadspaEffect.cpp:1174
LADSPA_IS_HINT_DEFAULT_1
#define LADSPA_IS_HINT_DEFAULT_1(x)
Definition: ladspa.h:330
LadspaEffectsModule::CreateInstance
ComponentInterface * CreateInstance(const PluginPath &path) override
Definition: LadspaEffect.cpp:336
LadspaEffect::CloseUI
bool CloseUI() override
Definition: LadspaEffect.cpp:1538
ID_Sliders
@ ID_Sliders
Definition: LadspaEffect.cpp:498
LadspaEffect::GetAudioOutCount
unsigned GetAudioOutCount() override
Definition: LadspaEffect.cpp:898
LADSPA_PortDescriptor
int LADSPA_PortDescriptor
Definition: ladspa.h:152
Effect
Base class for many of the effects in Audacity.
Definition: Effect.h:71
EffectTypeGenerate
@ EffectTypeGenerate
Definition: EffectInterface.h:58
LadspaEffect::LoadUserPreset
bool LoadUserPreset(const RegistryPath &name) override
Definition: LadspaEffect.cpp:1147
LadspaEffectsModule::IsPluginValid
bool IsPluginValid(const PluginPath &path, bool bFast) override
Definition: LadspaEffect.cpp:328
LadspaEffect::SupportsRealtime
bool SupportsRealtime() override
Definition: LadspaEffect.cpp:717
ShuttleGuiBase::TieCheckBox
wxCheckBox * TieCheckBox(const TranslatableString &Prompt, bool &Var)
Definition: ShuttleGui.cpp:1603
LadspaEffect::GetLatency
sampleCount GetLatency() override
Definition: LadspaEffect.cpp:930
LadspaEffect::GetFamily
EffectFamilySymbol GetFamily() override
Definition: LadspaEffect.cpp:697
LadspaEffect::GetAudioInCount
unsigned GetAudioInCount() override
Definition: LadspaEffect.cpp:893
LadspaEffect::ImportPresets
void ImportPresets() override
Definition: LadspaEffect.cpp:1563
LadspaEffect::LoadFactoryPreset
bool LoadFactoryPreset(int id) override
Definition: LadspaEffect.cpp:1169
LadspaEffect::SetAutomationParameters
bool SetAutomationParameters(CommandParameters &parms) override
Definition: LadspaEffect.cpp:1125
LadspaEffect::IsLegacy
bool IsLegacy() override
Definition: LadspaEffect.cpp:712
LadspaEffectOptionsDialog::mHost
EffectHostInterface * mHost
Definition: LadspaEffect.cpp:417
DECLARE_BUILTIN_MODULE
DECLARE_BUILTIN_MODULE(LadspaBuiltin)
XO
#define XO(s)
Definition: Internat.h:32
LadspaEffect::SetBlockSize
size_t SetBlockSize(size_t maxBlockSize) override
Definition: LadspaEffect.cpp:918
LadspaEffectsModule::FindPluginPaths
PluginPaths FindPluginPaths(PluginManagerInterface &pm) override
Definition: LadspaEffect.cpp:227
LadspaEffect::mData
const LADSPA_Descriptor * mData
Definition: LadspaEffect.h:155
LadspaEffectsModule::GetFileExtensions
const FileExtensions & GetFileExtensions() override
Definition: LadspaEffect.cpp:171
LadspaEffect::HideUI
bool HideUI() override
Definition: LadspaEffect.cpp:1533
LadspaEffect::PopulateUI
bool PopulateUI(ShuttleGui &S) override
Definition: LadspaEffect.cpp:1195
LADSPA_IS_HINT_TOGGLED
#define LADSPA_IS_HINT_TOGGLED(x)
Definition: ladspa.h:312
LadspaEffect::GetMidiInCount
int GetMidiInCount() override
Definition: LadspaEffect.cpp:903
CommandParameters::GetParameters
bool GetParameters(wxString &parms)
Definition: EffectAutomationParameters.h:259
LadspaEffectsModule::Terminate
void Terminate() override
Definition: LadspaEffect.cpp:156
LadspaEffect::ShowInterface
bool ShowInterface(wxWindow &parent, const EffectDialogFactory &factory, bool forceModal=false) override
Definition: LadspaEffect.cpp:1070
LadspaEffect::SetSampleRate
void SetSampleRate(double rate) override
Definition: LadspaEffect.cpp:913
LadspaEffectMeter::mVal
const float & mVal
Definition: LadspaEffect.cpp:521
_LADSPA_PortRangeHint::UpperBound
LADSPA_Data UpperBound
Definition: ladspa.h:350
LadspaEffectMeter::OnIdle
void OnIdle(wxIdleEvent &evt)
Definition: LadspaEffect.cpp:551
_LADSPA_PortRangeHint::HintDescriptor
LADSPA_PortRangeHintDescriptor HintDescriptor
Definition: ladspa.h:340
LADSPA_Descriptor_Function
const LADSPA_Descriptor *(* LADSPA_Descriptor_Function)(unsigned long Index)
Definition: ladspa.h:593
LadspaEffect::IsDefault
bool IsDefault() override
Definition: LadspaEffect.cpp:707
LADSPA_IS_HINT_DEFAULT_MIDDLE
#define LADSPA_IS_HINT_DEFAULT_MIDDLE(x)
Definition: ladspa.h:322
NumericTextCtrl
Definition: NumericTextCtrl.h:169
LadspaEffectsModule::GetSymbol
ComponentInterfaceSymbol GetSymbol() override
Definition: LadspaEffect.cpp:122
LadspaEffect::IsInteractive
bool IsInteractive() override
Definition: LadspaEffect.cpp:702
LadspaEffect::IsReady
bool IsReady() override
Definition: LadspaEffect.cpp:946
OnSize
static void OnSize(wxSizeEvent &evt)
Definition: VSTEffect.cpp:2793
wxArrayStringEx
Definition: MemoryX.h:663
LadspaEffect::Unload
void Unload()
Definition: LadspaEffect.cpp:1625
LadspaEffect::GetSymbol
ComponentInterfaceSymbol GetSymbol() override
Definition: LadspaEffect.cpp:653
wxEVT_COMMAND_TEXT_UPDATED
wxEVT_COMMAND_TEXT_UPDATED
Definition: Nyquist.cpp:126
LADSPA_IS_HINT_DEFAULT_LOW
#define LADSPA_IS_HINT_DEFAULT_LOW(x)
Definition: ladspa.h:320
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition: ComponentInterface.h:60
ID_Toggles
@ ID_Toggles
Definition: LadspaEffect.cpp:497
LadspaEffectOptionsDialog::OnOk
void OnOk(wxCommandEvent &evt)
Definition: LadspaEffect.cpp:479
NumericTextCtrl::Options
Definition: NumericTextCtrl.h:175
LadspaEffect::RealtimeFinalize
bool RealtimeFinalize() override
Definition: LadspaEffect.cpp:1019
LadspaEffectsModule::LadspaEffectsModule
LadspaEffectsModule(const wxString *path)
Definition: LadspaEffect.cpp:101
LadspaEffect::RealtimeAddProcessor
bool RealtimeAddProcessor(unsigned numChannels, float sampleRate) override
Definition: LadspaEffect.cpp:1006
LadspaEffect::mFields
ArrayOf< wxTextCtrl * > mFields
Definition: LadspaEffect.h:192
LADSPA_IS_HINT_DEFAULT_100
#define LADSPA_IS_HINT_DEFAULT_100(x)
Definition: ladspa.h:332
LadspaEffect::GetAutomationParameters
bool GetAutomationParameters(CommandParameters &parms) override
Definition: LadspaEffect.cpp:1107
LadspaEffectsModule::mPath
wxString mPath
Definition: LadspaEffect.h:248
LadspaEffect::ProcessInitialize
bool ProcessInitialize(sampleCount totalLen, ChannelNames chanMap=NULL) override
Definition: LadspaEffect.cpp:951
PluginManagerInterface::IsPluginRegistered
virtual bool IsPluginRegistered(const PluginPath &path)=0
LadspaEffect::RealtimeProcessEnd
bool RealtimeProcessEnd() override
Definition: LadspaEffect.cpp:1065
LADSPA_IS_HINT_SAMPLE_RATE
#define LADSPA_IS_HINT_SAMPLE_RATE(x)
Definition: ladspa.h:313
LadspaEffect::OnCheckBox
void OnCheckBox(wxCommandEvent &evt)
Definition: LadspaEffect.cpp:1710
XXO
#define XXO(s)
Definition: Internat.h:45
ShuttleGuiBase::EndHorizontalLay
void EndHorizontalLay()
Definition: ShuttleGui.cpp:1170
PluginManagerInterface
Definition: PluginInterface.h:55
LadspaEffect::GetVersion
wxString GetVersion() override
Definition: LadspaEffect.cpp:663
factory
static RegisteredToolbarFactory factory
Definition: ControlToolBar.cpp:804
LadspaEffectsModule::AutoRegisterPlugins
bool AutoRegisterPlugins(PluginManagerInterface &pm) override
Definition: LadspaEffect.cpp:200
LadspaEffect::ProcessFinalize
bool ProcessFinalize() override
Definition: LadspaEffect.cpp:969
LadspaEffect::SetHostUI
void SetHostUI(EffectUIHostInterface *host) override
Definition: LadspaEffect.cpp:1190
LadspaEffect::ValidateUI
bool ValidateUI() override
Definition: LadspaEffect.cpp:1518
LadspaEffectsModule::~LadspaEffectsModule
virtual ~LadspaEffectsModule()
Definition: LadspaEffect.cpp:109
ShuttleGuiBase::StartHorizontalLay
void StartHorizontalLay(int PositionFlags=wxALIGN_CENTRE, int iProp=1)
Definition: ShuttleGui.cpp:1160
LadspaEffectMeter::OnSize
void OnSize(wxSizeEvent &evt)
Definition: LadspaEffect.cpp:598
ShuttleGuiBase::EndVerticalLay
void EndVerticalLay()
Definition: ShuttleGui.cpp:1196
LadspaEffectsModule::GetSearchPaths
FilePaths GetSearchPaths()
Definition: LadspaEffect.cpp:357
LadspaEffectOptionsDialog::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S)
Definition: LadspaEffect.cpp:442
ChannelNames
enum ChannelName * ChannelNames
LADSPA_IS_PORT_OUTPUT
#define LADSPA_IS_PORT_OUTPUT(x)
Definition: ladspa.h:169
LADSPA_IS_HINT_DEFAULT_MAXIMUM
#define LADSPA_IS_HINT_DEFAULT_MAXIMUM(x)
Definition: ladspa.h:326
LadspaEffect::ExportPresets
void ExportPresets() override
Definition: LadspaEffect.cpp:1559
LadspaEffect::SaveParameters
bool SaveParameters(const RegistryPath &group)
Definition: LadspaEffect.cpp:1650
name
const TranslatableString name
Definition: Distortion.cpp:98
LadspaEffectsModule::GetVersion
wxString GetVersion() override
Definition: LadspaEffect.cpp:135
NumericConverter::TIME
@ TIME
Definition: NumericTextCtrl.h:51
PluginPath
wxString PluginPath
type alias for identifying a Plugin supplied by a module, each module defining its own interpretation...
Definition: Types.h:257
LadspaEffectsModule::GetVendor
VendorSymbol GetVendor() override
Definition: LadspaEffect.cpp:130
EffectTypeTool
@ EffectTypeTool
Definition: EffectInterface.h:61
ShuttleGuiBase::GetParent
wxWindow * GetParent()
Definition: ShuttleGui.h:503
LADSPA_IS_HINT_LOGARITHMIC
#define LADSPA_IS_HINT_LOGARITHMIC(x)
Definition: ladspa.h:314
LadspaEffect::LoadParameters
bool LoadParameters(const RegistryPath &group)
Definition: LadspaEffect.cpp:1633
LADSPAEFFECTS_FAMILY
#define LADSPAEFFECTS_FAMILY
Definition: LadspaEffect.h:32
WindowAccessible
An alternative to using wxWindowAccessible, which in wxWidgets 3.1.1 contained GetParent() which was ...
PluginManagerInterface::FindFilesInPathList
virtual void FindFilesInPathList(const wxString &pattern, const FilePaths &pathList, FilePaths &files, bool directories=false)=0
_LADSPA_PortRangeHint::LowerBound
LADSPA_Data LowerBound
Definition: ladspa.h:345
EffectClientInterface::EffectDialogFactory
std::function< wxDialog *(wxWindow &parent, EffectHostInterface *, EffectUIClientInterface *) > EffectDialogFactory
Definition: EffectInterface.h:149
LadspaEffect::Load
bool Load()
Definition: LadspaEffect.cpp:1586
LadspaEffect::SupportsAutomation
bool SupportsAutomation() override
Definition: LadspaEffect.cpp:722
LadspaEffect::ProcessBlock
size_t ProcessBlock(float **inBlock, float **outBlock, size_t blockLen) override
Definition: LadspaEffect.cpp:982
LadspaEffectsModule::GetDescription
TranslatableString GetDescription() override
Definition: LadspaEffect.cpp:141
LadspaEffect::HasOptions
bool HasOptions() override
Definition: LadspaEffect.cpp:1567
EffectUIHostInterface
EffectUIHostInterface has nothing in it. It is provided so that an Effect can call SetHostUI passing ...
Definition: EffectInterface.h:216
LADSPA_IS_PORT_INPUT
#define LADSPA_IS_PORT_INPUT(x)
Definition: ladspa.h:168
LADSPA_IS_HINT_DEFAULT_0
#define LADSPA_IS_HINT_DEFAULT_0(x)
Definition: ladspa.h:328
LadspaEffect::GetType
EffectType GetType() override
Definition: LadspaEffect.cpp:677
LadspaEffectsModule
Definition: LadspaEffect.h:209
LadspaEffectMeter::mMax
float mMax
Definition: LadspaEffect.cpp:523
ShuttleGuiBase::StartStatic
wxStaticBox * StartStatic(const TranslatableString &Str, int iProp=0)
Definition: ShuttleGui.cpp:886
_LADSPA_PortRangeHint
_LADSPA_PortRangeHint is a structure that gives parameter validation information for a LADSPA (Linux ...
Definition: ladspa.h:337
LadspaEffect::GetFactoryPresets
RegistryPaths GetFactoryPresets() override
Definition: LadspaEffect.cpp:1164
LadspaEffect::mSliders
ArrayOf< wxSlider * > mSliders
Definition: LadspaEffect.h:191
LAT1CTOWX
#define LAT1CTOWX(X)
Definition: Internat.h:161
_LADSPA_Descriptor::PortRangeHints
const LADSPA_PortRangeHint * PortRangeHints
Definition: ladspa.h:419
min
int min(int a, int b)
Definition: CompareAudioCommand.cpp:106
FilePath
wxString FilePath
Definition: Types.h:270
PluginManagerInterface::DefaultRegistrationCallback
static const PluginID & DefaultRegistrationCallback(ModuleInterface *provider, ComponentInterface *ident)
Definition: PluginManager.cpp:1384
wxDialogWrapper
Definition: wxPanelWrapper.h:81
LadspaEffect::RealtimeInitialize
bool RealtimeInitialize() override
Definition: LadspaEffect.cpp:1001
LadspaEffect::OnSlider
void OnSlider(wxCommandEvent &evt)
Definition: LadspaEffect.cpp:1717
LADSPAEFFECTS_VERSION
#define LADSPAEFFECTS_VERSION
Definition: LadspaEffect.h:28
LadspaEffectMeter::~LadspaEffectMeter
virtual ~LadspaEffectMeter()
Definition: LadspaEffect.cpp:547
LadspaEffect::OnTextCtrl
void OnTextCtrl(wxCommandEvent &evt)
Definition: LadspaEffect.cpp:1753
LadspaEffect::RealtimeProcessStart
bool RealtimeProcessStart() override
Definition: LadspaEffect.cpp:1040
LADSPA_IS_HINT_BOUNDED_ABOVE
#define LADSPA_IS_HINT_BOUNDED_ABOVE(x)
Definition: ladspa.h:311
LadspaEffect
An Effect that calls up a LADSPA plug in, i.e. many possible effects from this one class.
Definition: LadspaEffect.h:45
_
#define _(s)
Definition: Internat.h:76
sampleCount
Definition: Types.h:581
EffectTypeAnalyze
@ EffectTypeAnalyze
Definition: EffectInterface.h:60
RTLD_DEEPBIND
#define RTLD_DEEPBIND
Definition: LadspaEffect.cpp:34
LadspaEffect::RealtimeProcess
size_t RealtimeProcess(int group, float **inbuf, float **outbuf, size_t numSamples) override
Definition: LadspaEffect.cpp:1045
Verbatim
TranslatableString Verbatim(wxString str)
Definition: Types.h:573
ID_Duration
@ ID_Duration
Definition: LadspaEffect.cpp:496
LadspaEffect::GetDescription
TranslatableString GetDescription() override
Definition: LadspaEffect.cpp:668
LADSPA_IS_HINT_DEFAULT_HIGH
#define LADSPA_IS_HINT_DEFAULT_HIGH(x)
Definition: ladspa.h:324
LADSPA_IS_HINT_DEFAULT_MINIMUM
#define LADSPA_IS_HINT_DEFAULT_MINIMUM(x)
Definition: ladspa.h:318
ComponentInterface
ComponentInterface provides name / vendor / version functions to identify plugins....
Definition: ComponentInterface.h:121
LadspaEffectOptionsDialog::~LadspaEffectOptionsDialog
virtual ~LadspaEffectOptionsDialog()
Definition: LadspaEffect.cpp:438
ShuttleGui::AddStandardButtons
void AddStandardButtons(long buttons=eOkButton|eCancelButton, wxWindow *extra=NULL)
Definition: ShuttleGui.cpp:2406
LadspaEffectMeter
Definition: LadspaEffect.cpp:509
LADSPA_Handle
void * LADSPA_Handle
Definition: ladspa.h:363
LadspaEffect::RealtimeSuspend
bool RealtimeSuspend() override
Definition: LadspaEffect.cpp:1030
ShuttleGuiBase::SetBorder
void SetBorder(int Border)
Definition: ShuttleGui.h:497
Internat::ToDisplayString
static wxString ToDisplayString(double numberToConvert, int digitsAfterDecimalPoint=-1)
Convert a number to a string, uses the user's locale's decimal separator.
Definition: Internat.cpp:166
RegistryPath
wxString RegistryPath
Definition: Types.h:261
ShuttleGuiBase::AddVariableText
wxStaticText * AddVariableText(const TranslatableString &Str, bool bCenter=false, int PositionFlags=0, int wrapWidth=0)
Definition: ShuttleGui.cpp:456
LadspaEffect::ShowOptions
void ShowOptions() override
Definition: LadspaEffect.cpp:1572
LadspaEffectsModule::GetPath
PluginPath GetPath() override
Definition: LadspaEffect.cpp:117
LadspaEffect::CanExportPresets
bool CanExportPresets() override
Definition: LadspaEffect.cpp:1554
ModuleInterface::RegistrationCallback
std::function< const PluginID &(ModuleInterface *, ComponentInterface *) > RegistrationCallback
Definition: ModuleInterface.h:121
ShuttleGuiBase::EndStatic
void EndStatic()
Definition: ShuttleGui.cpp:915
EffectType
EffectType
Definition: EffectInterface.h:55
safenew
#define safenew
Definition: MemoryX.h:8
LadspaEffectMeter::OnPaint
void OnPaint(wxPaintEvent &evt)
Definition: LadspaEffect.cpp:565
LadspaEffect::GetTailSize
size_t GetTailSize() override
Definition: LadspaEffect.cpp:941
LADSPA_IS_HINT_BOUNDED_BELOW
#define LADSPA_IS_HINT_BOUNDED_BELOW(x)
Definition: ladspa.h:310
LadspaEffect::GetMidiOutCount
int GetMidiOutCount() override
Definition: LadspaEffect.cpp:908
DECLARE_MODULE_ENTRY
DECLARE_MODULE_ENTRY(AudacityModule)
Definition: LadspaEffect.cpp:83
LADSPA_IS_PORT_AUDIO
#define LADSPA_IS_PORT_AUDIO(x)
Definition: ladspa.h:171
_LADSPA_Descriptor
_LADSPA_Descriptor is a structure that provides the API to a LADSPA (Linux Audio Plugin Architecture)...
Definition: ladspa.h:373
anonymous_namespace{Menus.cpp}::Options
std::vector< CommandFlagOptions > & Options()
Definition: Menus.cpp:526
LadspaEffectsModule::InstallPath
FilePath InstallPath() override
Definition: LadspaEffect.cpp:194
LadspaEffect::GetPath
PluginPath GetPath() override
Definition: LadspaEffect.cpp:648
END_EVENT_TABLE
END_EVENT_TABLE()
LADSPA_IS_PORT_CONTROL
#define LADSPA_IS_PORT_CONTROL(x)
Definition: ladspa.h:170
LadspaEffectsModule::DiscoverPluginsAtPath
unsigned DiscoverPluginsAtPath(const PluginPath &path, TranslatableString &errMsg, const RegistrationCallback &callback) override
Definition: LadspaEffect.cpp:252
EVT_COMMAND_RANGE
EVT_COMMAND_RANGE(ID_Slider, ID_Slider+NUMBER_OF_BANDS - 1, wxEVT_COMMAND_SLIDER_UPDATED, EffectEqualization::OnSlider) EffectEqualization
Definition: Equalization.cpp:217
LadspaEffect.h
LadspaEffectMeter::mLastValue
float mLastValue
Definition: LadspaEffect.cpp:524
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:638
Internat::CompatibleToDouble
static bool CompatibleToDouble(const wxString &stringToConvert, double *result)
Convert a string to a number.
Definition: Internat.cpp:139
LadspaEffectsModule::DeleteInstance
void DeleteInstance(ComponentInterface *instance) override
Definition: LadspaEffect.cpp:350
LadspaEffectOptionsDialog::mUseLatency
bool mUseLatency
Definition: LadspaEffect.cpp:418
LADSPA_IS_HINT_DEFAULT_440
#define LADSPA_IS_HINT_DEFAULT_440(x)
Definition: ladspa.h:334
LadspaEffectsModule::GetOptionalFamilySymbol
EffectFamilySymbol GetOptionalFamilySymbol() override
Definition: LadspaEffect.cpp:162
LadspaEffect::GetVendor
VendorSymbol GetVendor() override
Definition: LadspaEffect.cpp:658
kShippedEffects
static const wxChar * kShippedEffects[]
Definition: LadspaEffect.cpp:69