Audacity 3.2.0
Classes | Macros | Typedefs | Enumerations | Functions
VSTEffect.cpp File Reference
#include "VSTEffect.h"
#include "ModuleManager.h"
#include "SampleCount.h"
#include "../../widgets/ProgressDialog.h"
#include <limits.h>
#include <stdio.h>
#include <wx/setup.h>
#include <wx/dynlib.h>
#include <wx/app.h>
#include <wx/defs.h>
#include <wx/buffer.h>
#include <wx/busyinfo.h>
#include <wx/button.h>
#include <wx/combobox.h>
#include <wx/file.h>
#include <wx/filename.h>
#include <wx/imaglist.h>
#include <wx/listctrl.h>
#include <wx/log.h>
#include <wx/module.h>
#include <wx/process.h>
#include <wx/recguard.h>
#include <wx/sizer.h>
#include <wx/slider.h>
#include <wx/scrolwin.h>
#include <wx/sstream.h>
#include <wx/statbox.h>
#include <wx/stattext.h>
#include <wx/timer.h>
#include <wx/tokenzr.h>
#include <wx/utils.h>
#include <shlwapi.h>
#include "FileNames.h"
#include "PlatformCompatibility.h"
#include "../../SelectFile.h"
#include "../../ShuttleGui.h"
#include "../../widgets/valnum.h"
#include "../../widgets/AudacityMessageBox.h"
#include "../../widgets/NumericTextCtrl.h"
#include "XMLFileReader.h"
#include "Base64.h"
#include "ConfigInterface.h"
#include <cstring>
#include "VSTControlMSW.h"
Include dependency graph for VSTEffect.cpp:

Go to the source code of this file.

Classes

class  VSTSubEntry
 
class  VSTSubProcess
 
class  VSTEffectOptionsDialog
 
class  VSTEffectTimer
 

Macros

#define OUTPUTKEY   wxT("<VSTLOADCHK>-")
 
#define VSTPATH   wxT("/Library/Audio/Plug-Ins/VST")
 

Typedefs

typedef AEffect *(* vstPluginMain) (audioMasterCallback audioMaster)
 

Enumerations

enum  InfoKeys {
  kKeySubIDs , kKeyBegin , kKeyName , kKeyPath ,
  kKeyVendor , kKeyVersion , kKeyDescription , kKeyEffectType ,
  kKeyInteractive , kKeyAutomatable , kKeyEnd
}
 
enum  { ID_Duration = 20000 , ID_Sliders = 21000 }
 

Functions

static float reinterpretAsFloat (uint32_t x)
 
static uint32_t reinterpretAsUint32 (float f)
 
 DECLARE_PROVIDER_ENTRY (AudacityModule)
 
 DECLARE_BUILTIN_PROVIDER (VSTBuiltin)
 
 IMPLEMENT_DYNAMIC_CLASS (VSTSubEntry, wxModule)
 
 DEFINE_LOCAL_EVENT_TYPE (EVT_SIZEWINDOW)
 
 DEFINE_LOCAL_EVENT_TYPE (EVT_UPDATEDISPLAY)
 
static void OnSize (wxSizeEvent &evt)
 

Macro Definition Documentation

◆ OUTPUTKEY

#define OUTPUTKEY   wxT("<VSTLOADCHK>-")

Definition at line 202 of file VSTEffect.cpp.

◆ VSTPATH

#define VSTPATH   wxT("/Library/Audio/Plug-Ins/VST")

Typedef Documentation

◆ vstPluginMain

typedef AEffect *(* vstPluginMain) (audioMasterCallback audioMaster)

Definition at line 942 of file VSTEffect.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ID_Duration 
ID_Sliders 

Definition at line 923 of file VSTEffect.cpp.

924{
925 ID_Duration = 20000,
926 ID_Sliders = 21000,
927};
@ ID_Duration
Definition: VSTEffect.cpp:925
@ ID_Sliders
Definition: VSTEffect.cpp:926

◆ InfoKeys

enum InfoKeys
Enumerator
kKeySubIDs 
kKeyBegin 
kKeyName 
kKeyPath 
kKeyVendor 
kKeyVersion 
kKeyDescription 
kKeyEffectType 
kKeyInteractive 
kKeyAutomatable 
kKeyEnd 

Definition at line 203 of file VSTEffect.cpp.

204{
206 kKeyBegin,
207 kKeyName,
208 kKeyPath,
215 kKeyEnd
216};
@ kKeyVendor
Definition: VSTEffect.cpp:209
@ kKeyDescription
Definition: VSTEffect.cpp:211
@ kKeyAutomatable
Definition: VSTEffect.cpp:214
@ kKeyEffectType
Definition: VSTEffect.cpp:212
@ kKeyBegin
Definition: VSTEffect.cpp:206
@ kKeyEnd
Definition: VSTEffect.cpp:215
@ kKeyInteractive
Definition: VSTEffect.cpp:213
@ kKeyVersion
Definition: VSTEffect.cpp:210
@ kKeyPath
Definition: VSTEffect.cpp:208
@ kKeySubIDs
Definition: VSTEffect.cpp:205
@ kKeyName
Definition: VSTEffect.cpp:207

Function Documentation

◆ DECLARE_BUILTIN_PROVIDER()

DECLARE_BUILTIN_PROVIDER ( VSTBuiltin  )

◆ DECLARE_PROVIDER_ENTRY()

DECLARE_PROVIDER_ENTRY ( AudacityModule  )

Definition at line 144 of file VSTEffect.cpp.

145{
146 // Create our effects module and register
147 // Trust the module manager not to leak this
148 return safenew VSTEffectsModule();
149}
#define safenew
Definition: MemoryX.h:10

References safenew.

◆ DEFINE_LOCAL_EVENT_TYPE() [1/2]

DEFINE_LOCAL_EVENT_TYPE ( EVT_SIZEWINDOW  )

◆ DEFINE_LOCAL_EVENT_TYPE() [2/2]

DEFINE_LOCAL_EVENT_TYPE ( EVT_UPDATEDISPLAY  )

◆ IMPLEMENT_DYNAMIC_CLASS()

IMPLEMENT_DYNAMIC_CLASS ( VSTSubEntry  ,
wxModule   
)

◆ OnSize()

static void OnSize ( wxSizeEvent &  evt)
static

Definition at line 2593 of file VSTEffect.cpp.

2594{
2595 evt.Skip();
2596
2597 // Once the parent dialog reaches its final size as indicated by
2598 // a non-default minimum size, we set the maximum size to match.
2599 // This is a bit of a hack to prevent VSTs GUI windows from resizing
2600 // there's no real reason to allow it. But, there should be a better
2601 // way of handling it.
2602 wxWindow *w = (wxWindow *) evt.GetEventObject();
2603 wxSize sz = w->GetMinSize();
2604
2605 if (sz != wxDefaultSize)
2606 {
2607 w->SetMaxSize(sz);
2608 }
2609}

Referenced by VSTEffect::BuildFancy(), LyricsPanel::LyricsPanel(), and DependencyDialog::OnSize().

Here is the caller graph for this function:

◆ reinterpretAsFloat()

static float reinterpretAsFloat ( uint32_t  x)
static

Definition at line 113 of file VSTEffect.cpp.

114{
115 static_assert(sizeof(float) == sizeof(uint32_t), "Cannot reinterpret uint32_t to float since sizes are different.");
116 float f;
117 std::memcpy(&f, &x, sizeof(float));
118 return f;
119}

Referenced by VSTEffect::LoadFXProgram().

Here is the caller graph for this function:

◆ reinterpretAsUint32()

static uint32_t reinterpretAsUint32 ( float  f)
static

Definition at line 121 of file VSTEffect.cpp.

122{
123 static_assert(sizeof(float) == sizeof(uint32_t), "Cannot reinterpret float to uint32_t since sizes are different.");
124
125 uint32_t x;
126 std::memcpy(&x, &f, sizeof(uint32_t));
127 return x;
128}

Referenced by VSTEffect::SaveFXProgram().

Here is the caller graph for this function: