diff options
author | Carl Hetherington <carl@carlh.net> | 2011-11-22 02:27:26 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-11-22 02:27:26 +0000 |
commit | 16aece1d47ad1c1137d68ab12989cbc94b112c0f (patch) | |
tree | 4d07547a58e4209f3d40642f40907e2b658fef2b /libs/ardour/ardour | |
parent | 51e43ae5a7df65c2d0b7c1f2dcec22511cfb8a98 (diff) |
Share main VSTFX / FST struct between windows / linux VSTs.
git-svn-id: svn://localhost/ardour2/branches/3.0@10762 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour')
-rwxr-xr-x | libs/ardour/ardour/lxvst_plugin.h | 6 | ||||
-rw-r--r-- | libs/ardour/ardour/vst_types.h | 59 | ||||
-rwxr-xr-x | libs/ardour/ardour/vstfx.h | 87 | ||||
-rw-r--r-- | libs/ardour/ardour/windows_vst_plugin.h | 8 |
4 files changed, 80 insertions, 80 deletions
diff --git a/libs/ardour/ardour/lxvst_plugin.h b/libs/ardour/ardour/lxvst_plugin.h index 9384014100..f47bb140aa 100755 --- a/libs/ardour/ardour/lxvst_plugin.h +++ b/libs/ardour/ardour/lxvst_plugin.h @@ -87,7 +87,7 @@ class LXVSTPlugin : public ARDOUR::Plugin int set_state (XMLNode const &, int); AEffect * plugin () const { return _plugin; } - VSTFX * vstfx () const { return _vstfx; } + VSTState * vstfx () const { return _vstfx; } private: @@ -103,8 +103,8 @@ private: void add_state (XMLNode *) const; VSTHandle * handle; - VSTFX* _vstfx; - AEffect* _plugin; + VSTState * _vstfx; + AEffect * _plugin; bool been_resumed; }; diff --git a/libs/ardour/ardour/vst_types.h b/libs/ardour/ardour/vst_types.h index f441844e2d..9bc64b269f 100644 --- a/libs/ardour/ardour/vst_types.h +++ b/libs/ardour/ardour/vst_types.h @@ -69,4 +69,63 @@ struct _VSTHandle typedef struct _VSTHandle VSTHandle; +struct _VSTState +{ + AEffect* plugin; + + /* Linux */ + int linux_window; /* The plugin's parent X11 XWindow */ + int linux_plugin_ui_window; /*The ID of the plugin UI window created by the plugin*/ + + /* Windows */ + void* windows_window; + + int xid; /* X11 XWindow */ + + int want_resize; /*Set to signal the plugin resized its UI*/ + void* extra_data; /*Pointer to any extra data*/ + + void* event_callback_thisptr; + void (*eventProc) (void* event); + + VSTHandle* handle; + + int width; + int height; + int wantIdle; + int destroy; + int vst_version; + int has_editor; + + int program_set_without_editor; + + int want_program; + int want_chunk; + int n_pending_keys; + unsigned char* wanted_chunk; + int wanted_chunk_size; + int current_program; + float * want_params; + float * set_params; + + VSTKey pending_keys[16]; + + int dispatcher_wantcall; + int dispatcher_opcode; + int dispatcher_index; + int dispatcher_val; + void * dispatcher_ptr; + float dispatcher_opt; + int dispatcher_retval; + + struct _VSTState * next; + pthread_mutex_t lock; + pthread_cond_t window_status_change; + pthread_cond_t plugin_dispatcher_called; + pthread_cond_t window_created; + int been_activated; +}; + +typedef struct _VSTState VSTState; + #endif diff --git a/libs/ardour/ardour/vstfx.h b/libs/ardour/ardour/vstfx.h index 08534e408a..0f8772230b 100755 --- a/libs/ardour/ardour/vstfx.h +++ b/libs/ardour/ardour/vstfx.h @@ -18,93 +18,34 @@ void vstfx_set_error_function (void (*func)(const char *)); void vstfx_error (const char *fmt, ...); -#include "ardour/vestige/aeffectx.h" - -typedef struct _VSTFX VSTFX; - -/*Structure used to describe the instance of VSTFX responsible for - a particular plugin instance. These are connected together in a - linked list*/ - -struct _VSTFX -{ - AEffect* plugin; - int window; /* The plugin's parent X11 XWindow */ - int plugin_ui_window; /*The ID of the plugin UI window created by the plugin*/ - int xid; /* X11 XWindow */ - - int want_resize; /*Set to signal the plugin resized its UI*/ - void* extra_data; /*Pointer to any extra data*/ - - void* event_callback_thisptr; - void (*eventProc) (void* event); - - VSTHandle* handle; - - int width; - int height; - int wantIdle; - int destroy; - int vst_version; - int has_editor; - - int program_set_without_editor; - - int want_program; - int want_chunk; - int n_pending_keys; - unsigned char* wanted_chunk; - int wanted_chunk_size; - int current_program; - float *want_params; - float *set_params; - - VSTKey pending_keys[16]; - - int dispatcher_wantcall; - int dispatcher_opcode; - int dispatcher_index; - int dispatcher_val; - void * dispatcher_ptr; - float dispatcher_opt; - int dispatcher_retval; - - struct _VSTFX* next; - pthread_mutex_t lock; - pthread_cond_t window_status_change; - pthread_cond_t plugin_dispatcher_called; - pthread_cond_t window_created; - int been_activated; -}; - /*API to vstfx*/ -extern int vstfx_launch_editor(VSTFX* vstfx); -extern int vstfx_init (void* possible_hmodule); +extern int vstfx_launch_editor (VSTState *); +extern int vstfx_init (void *); extern void vstfx_exit (); extern VSTHandle * vstfx_load (const char*); extern int vstfx_unload (VSTHandle *); -extern VSTFX* vstfx_instantiate (VSTHandle *, audioMasterCallback, void *); -extern void vstfx_close (VSTFX*); +extern VSTState * vstfx_instantiate (VSTHandle *, audioMasterCallback, void *); +extern void vstfx_close (VSTState*); -extern int vstfx_create_editor (VSTFX* vstfx); -extern int vstfx_run_editor (VSTFX*); -extern void vstfx_destroy_editor (VSTFX*); -extern int vstfx_get_XID (VSTFX*); -extern void vstfx_move_window_into_view (VSTFX*); +extern int vstfx_create_editor (VSTState *); +extern int vstfx_run_editor (VSTState *); +extern void vstfx_destroy_editor (VSTState *); +extern int vstfx_get_XID (VSTState *); +extern void vstfx_move_window_into_view (VSTState *); -extern VSTInfo * vstfx_get_info (char *dllpathname); +extern VSTInfo * vstfx_get_info (char *); extern void vstfx_free_info (VSTInfo *); -extern void vstfx_event_loop_remove_plugin (VSTFX* fst); -extern int vstfx_call_dispatcher (VSTFX *vstfx, int opcode, int index, int val, void *ptr, float opt); +extern void vstfx_event_loop_remove_plugin (VSTState *); +extern int vstfx_call_dispatcher (VSTState *, int, int, int, void *, float); /** Load a plugin state from a file.**/ -extern int vstfx_load_state (VSTFX* vstfx, char * filename); +extern int vstfx_load_state (VSTState* vstfx, char * filename); /** Save a plugin state to a file.**/ -extern bool vstfx_save_state (VSTFX* vstfx, char * filename); +extern bool vstfx_save_state (VSTState* vstfx, char * filename); #endif /* __vstfx_h__ */ diff --git a/libs/ardour/ardour/windows_vst_plugin.h b/libs/ardour/ardour/windows_vst_plugin.h index 973c25e6b0..6de87aee89 100644 --- a/libs/ardour/ardour/windows_vst_plugin.h +++ b/libs/ardour/ardour/windows_vst_plugin.h @@ -30,8 +30,8 @@ #include "pbd/stateful.h" #include "ardour/plugin.h" -struct _FST; -typedef struct _FST FST; +struct _VSTState; +typedef struct _VSTState VSTState; struct _AEffect; typedef struct _AEffect AEffect; struct _VSTHandle; @@ -87,7 +87,7 @@ class WindowsVSTPlugin : public ARDOUR::Plugin int set_state (XMLNode const &, int); AEffect * plugin () const { return _plugin; } - FST * fst () const { return _fst; } + VSTState * fst () const { return _fst; } private: @@ -103,7 +103,7 @@ private: void add_state (XMLNode *) const; VSTHandle* handle; - FST* _fst; + VSTState* _fst; AEffect* _plugin; bool been_resumed; }; |