2 Copyright (C) 2010 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __ardour_vst_types_h__
21 #define __ardour_vst_types_h__
24 #include "ardour/libardour_visibility.h"
25 #include "ardour/vestige/aeffectx.h"
27 struct LIBARDOUR_API _VSTKey
29 /** virtual-key code, or 0 if this _VSTFXKey is a `character' key */
31 /** `character' key, or 0 if this _VSTFXKey is a virtual-key */
35 typedef struct _VSTKey VSTKey;
37 struct LIBARDOUR_API _VSTInfo
51 int isInstrument; // still unused
52 int canProcessReplacing;
58 typedef struct _VSTInfo VSTInfo;
60 typedef AEffect * (* main_entry_t) (audioMasterCallback);
62 struct LIBARDOUR_API _VSTHandle
68 main_entry_t main_entry;
76 typedef struct _VSTHandle VSTHandle;
78 struct LIBARDOUR_API _VSTState
82 audioMasterCallback amc;
84 void* gtk_window_parent;
85 int xid; ///< X11 XWindow (wine + lxvst)
88 int linux_window; ///< The plugin's parent X11 XWindow
89 int linux_plugin_ui_window; ///< The ID of the plugin UI window created by the plugin
90 void (* eventProc) (void * event); ///< X11 UI _XEventProc
107 int program_set_without_editor;
111 unsigned char* wanted_chunk;
112 int wanted_chunk_size;
116 VSTKey pending_keys[16];
118 int dispatcher_wantcall;
119 int dispatcher_opcode;
120 int dispatcher_index;
122 void* dispatcher_ptr;
123 float dispatcher_opt;
124 int dispatcher_retval;
126 struct _VSTState* next;
127 pthread_mutex_t lock;
128 pthread_mutex_t state_lock;
129 pthread_cond_t window_status_change;
130 pthread_cond_t plugin_dispatcher_called;
131 pthread_cond_t window_created;
135 typedef struct _VSTState VSTState;
140 LIBARDOUR_API extern void vststate_init (VSTState* state);
141 LIBARDOUR_API extern void vststate_maybe_set_program (VSTState* state);