1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

The fabled realtime effects...

I've made it where you can enable and disable via experimentals:

EXPERIMENTAL_REALTIME_EFFECTS
EXPERIMENTAL_EFFECTS_RACK

You will notice that, as of now, the only effects currently set up for
realtime are VSTs.  Now that this is in, I will start converting the
rest.

As I start to convert the effects, the astute of you may notice that
they no longer directly access tracks or any "internal" Audacity
objects.  This isolates the effects from changes in Audacity and makes
it much easier to add new ones.

Anyway, all 3 platforms can now display VST effects in graphical mode.
Yes, that means Linux too.  There are quite a few VSTs for Linux if
you search for them.

The so-called "rack" definitely needs some discussion, work, and attention
from someone much better at graphics than me.  I'm not really sure it should
stay in as-is.  I'd originally planned for it to be simply a utility window
where you can store your (preconfigured) favorite effects.  It should probably
revert back to that idea.

You may notice that this DOES include the API work I did.  The realtime effects
were too tied to it and I didn't want to redo the whole thing.  As I mentioned
elsewhere, the API stuff may or may not be very future proof.

So, let the critter complaints commence.  I absolute KNOW there will be some.
(I know I'll be hearing from the Linux peeps pretty darn quickly.  ;-))
This commit is contained in:
lllucius
2014-10-26 03:24:10 +00:00
parent 789824617c
commit 1eeb4d979a
85 changed files with 14177 additions and 7350 deletions

118
src/ModuleManager.h Normal file
View File

@@ -0,0 +1,118 @@
/**********************************************************************
Audacity: A Digital Audio Editor
ModuleManager.h
Dominic Mazzoni
James Crook
**********************************************************************/
#ifndef __AUDACITY_MODULEMANAGER_H__
#define __AUDACITY_MODULEMANAGER_H__
#include <wx/dynlib.h>
#include <map>
#include <vector>
#include "audacity/ModuleInterface.h"
class CommandHandler;
wxWindow * MakeHijackPanel();
//
// Module Manager
//
// wxPluginManager would be MUCH better, but it's an "undocumented" framework.
//
#define ModuleDispatchName "ModuleDispatch"
typedef enum
{
ModuleInitialize,
ModuleTerminate,
AppInitialized,
AppQuiting,
ProjectInitialized,
ProjectClosing,
MenusRebuilt
} ModuleDispatchTypes;
typedef int (*fnModuleDispatch)(ModuleDispatchTypes type);
class Module
{
public:
Module(const wxString & name);
virtual ~Module();
bool Load();
void Unload();
int Dispatch(ModuleDispatchTypes type);
void * GetSymbol(wxString name);
private:
wxString mName;
wxDynamicLibrary *mLib;
fnModuleDispatch mDispatch;
};
typedef std::map<wxString, ModuleMain *> ModuleMainMap;
typedef std::map<wxString, ModuleInterface *> ModuleMap;
typedef std::map<ModuleInterface *, wxDynamicLibrary *> LibraryMap;
class ModuleManager : public ModuleManagerInterface
{
public:
ModuleManager();
virtual ~ModuleManager();
// -------------------------------------------------------------------------
// ModuleManagerInterface implementation
// -------------------------------------------------------------------------
virtual void RegisterModule(ModuleInterface *module);
// -------------------------------------------------------------------------
// ModuleManager implementation
// -------------------------------------------------------------------------
static ModuleManager & Get();
void Initialize(CommandHandler & cmdHandler);
int Dispatch(ModuleDispatchTypes type);
void EarlyInit();
// PluginManager use
bool DiscoverProviders(wxArrayString & providers);
bool DiscoverProvider(const wxString & path);
void FindAllPlugins(PluginIDList & providers, wxArrayString & paths);
wxArrayString FindPluginsForProvider(const PluginID & provider, const wxString & path);
bool RegisterPlugin(const PluginID & provider, const wxString & path);
void InitializePlugins();
bool IsProviderBuiltin(const PluginID & provider);
void *CreateProviderInstance(const PluginID & ID, const wxString & path);
void *CreateInstance(const PluginID & provider, const PluginID & ID, const wxString & path);
private:
void InitializeBuiltins();
ModuleInterface *LoadModule(const wxString & path);
void UnloadModule(ModuleInterface *module);
private:
static ModuleManager mInstance;
ModuleMainMap mModuleMains;
ModuleMap mDynModules;
LibraryMap mLibs;
wxArrayPtrVoid mModules;
};
#endif /* __AUDACITY_MODULEMANAGER_H__ */