Audacity 3.2.0
Classes | Namespaces | 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 <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/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/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  VSTEffectOptionsDialog
 
class  VSTEffectTimer
 
struct  anonymous_namespace{VSTEffect.cpp}::VSTEffectMessage
 

Namespaces

namespace  anonymous_namespace{VSTEffect.cpp}
 

Macros

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

Typedefs

typedef AEffect *(* vstPluginMain) (audioMasterCallback audioMaster)
 

Enumerations

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)
 
 wxDEFINE_EVENT (EVT_SIZEWINDOW, wxCommandEvent)
 
 DEFINE_LOCAL_EVENT_TYPE (EVT_UPDATEDISPLAY)
 
static void OnSize (wxSizeEvent &evt)
 

Macro Definition Documentation

◆ VSTPATH

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

Typedef Documentation

◆ vstPluginMain

typedef AEffect *(* vstPluginMain) (audioMasterCallback audioMaster)

Definition at line 602 of file VSTEffect.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ID_Duration 
ID_Sliders 

Definition at line 592 of file VSTEffect.cpp.

593{
594 ID_Duration = 20000,
595 ID_Sliders = 21000,
596};
@ ID_Duration
Definition: VSTEffect.cpp:594
@ ID_Sliders
Definition: VSTEffect.cpp:595

Function Documentation

◆ DECLARE_BUILTIN_PROVIDER()

DECLARE_BUILTIN_PROVIDER ( VSTBuiltin  )

◆ DECLARE_PROVIDER_ENTRY()

DECLARE_PROVIDER_ENTRY ( AudacityModule  )

Definition at line 141 of file VSTEffect.cpp.

142{
143 // Create our effects module and register
144 // Trust the module manager not to leak this
145 return std::make_unique<VSTEffectsModule>();
146}

◆ DEFINE_LOCAL_EVENT_TYPE()

DEFINE_LOCAL_EVENT_TYPE ( EVT_UPDATEDISPLAY  )

◆ OnSize()

static void OnSize ( wxSizeEvent &  evt)
static

Definition at line 2537 of file VSTEffect.cpp.

2538{
2539 evt.Skip();
2540
2541 // Once the parent dialog reaches its final size as indicated by
2542 // a non-default minimum size, we set the maximum size to match.
2543 // This is a bit of a hack to prevent VSTs GUI windows from resizing
2544 // there's no real reason to allow it. But, there should be a better
2545 // way of handling it.
2546 wxWindow *w = (wxWindow *) evt.GetEventObject();
2547 wxSize sz = w->GetMinSize();
2548
2549 if (sz != wxDefaultSize)
2550 {
2551 w->SetMaxSize(sz);
2552 }
2553}

Referenced by VSTEffectValidator::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 110 of file VSTEffect.cpp.

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

Referenced by VSTEffectWrapper::LoadFXProgram().

Here is the caller graph for this function:

◆ reinterpretAsUint32()

static uint32_t reinterpretAsUint32 ( float  f)
static

Definition at line 118 of file VSTEffect.cpp.

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

Referenced by VSTEffectWrapper::SaveFXProgram().

Here is the caller graph for this function:

◆ wxDEFINE_EVENT()

wxDEFINE_EVENT ( EVT_SIZEWINDOW  ,
wxCommandEvent   
)