Ardour  8.12
vst_types.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2011 Carl Hetherington <carl@carlh.net>
3  * Copyright (C) 2013-2018 Paul Davis <paul@linuxaudiosystems.com>
4  * Copyright (C) 2014-2017 Robin Gareus <robin@gareus.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #ifndef __ardour_vst_types_h__
22 #define __ardour_vst_types_h__
23 
24 #include <pthread.h>
26 #include "ardour/vestige/vestige.h"
27 
28 #ifdef MACVST_SUPPORT
29 #include <Carbon/Carbon.h>
30 
31 /* fix up stupid apple macros */
32 #undef check
33 #undef require
34 #undef verify
35 
36 #ifdef YES
37 #undef YES
38 #endif
39 #ifdef NO
40 #undef NO
41 #endif
42 
43 #endif
44 
46 {
48  int special;
50  int character;
51 };
52 
53 typedef struct _VSTKey VSTKey;
54 
55 typedef AEffect * (* main_entry_t) (audioMasterCallback);
56 
58 {
59 #ifdef MACVST_SUPPORT
60  CFBundleRef bundleRef;
61  CFBundleRefNum res_file_id;
62 #else
63  void* dll;
64 #endif
65 
66  char* name;
67  char* path;
69  int plugincnt;
70 };
71 
72 typedef struct _VSTHandle VSTHandle;
73 
75 {
79 
81  int xid;
82 
83  /* LXVST/X11 */
86  void (* eventProc) (void * event);
87 
88  /* Windows */
90 
91 
92  int width;
93  int height;
94  int wantIdle;
95 
96  int voffset;
97  int hoffset;
98  int gui_shown;
99  int destroy;
102 
107  unsigned char* wanted_chunk;
109  float* want_params;
110  float* set_params;
111 
112  VSTKey pending_keys[16];
113 
121 
122  struct _VSTState* next;
123  pthread_mutex_t lock;
124  pthread_mutex_t state_lock;
125  pthread_cond_t window_status_change;
126  pthread_cond_t plugin_dispatcher_called;
127  pthread_cond_t window_created;
129 };
130 
131 typedef struct _VSTState VSTState;
132 
133 #ifdef __cplusplus
134 extern "C" {
135 #endif
136 LIBARDOUR_API extern void vststate_init (VSTState* state);
138 #ifdef __cplusplus
139 }
140 #endif
141 
142 #endif
#define LIBARDOUR_API
void * dll
Definition: vst_types.h:63
char * path
Definition: vst_types.h:67
char * name
Definition: vst_types.h:66
main_entry_t main_entry
Definition: vst_types.h:68
int plugincnt
Definition: vst_types.h:69
int character
Definition: vst_types.h:50
int special
Definition: vst_types.h:48
int dispatcher_retval
Definition: vst_types.h:120
void * gtk_window_parent
Definition: vst_types.h:80
int dispatcher_wantcall
Definition: vst_types.h:114
VSTHandle * handle
Definition: vst_types.h:77
int n_pending_keys
Definition: vst_types.h:106
int linux_window
The plugin's parent X11 XWindow.
Definition: vst_types.h:84
pthread_mutex_t lock
Definition: vst_types.h:123
pthread_cond_t window_status_change
Definition: vst_types.h:125
int destroy
Definition: vst_types.h:99
unsigned char * wanted_chunk
Definition: vst_types.h:107
int gui_shown
Definition: vst_types.h:98
int wanted_chunk_size
Definition: vst_types.h:108
int want_program
Definition: vst_types.h:104
int dispatcher_index
Definition: vst_types.h:116
float * set_params
Definition: vst_types.h:110
int has_editor
Definition: vst_types.h:101
int height
Definition: vst_types.h:93
void * windows_window
Definition: vst_types.h:89
int want_chunk
Definition: vst_types.h:105
AEffect * plugin
Definition: vst_types.h:76
int wantIdle
Definition: vst_types.h:94
int dispatcher_val
Definition: vst_types.h:117
int program_set_without_editor
Definition: vst_types.h:103
int been_activated
Definition: vst_types.h:128
float dispatcher_opt
Definition: vst_types.h:119
void * dispatcher_ptr
Definition: vst_types.h:118
int voffset
Definition: vst_types.h:96
float * want_params
Definition: vst_types.h:109
pthread_cond_t plugin_dispatcher_called
Definition: vst_types.h:126
int width
Definition: vst_types.h:92
int linux_plugin_ui_window
The ID of the plugin UI window created by the plugin.
Definition: vst_types.h:85
int hoffset
Definition: vst_types.h:97
int xid
X11 XWindow (wine + lxvst)
Definition: vst_types.h:81
audioMasterCallback amc
Definition: vst_types.h:78
int dispatcher_opcode
Definition: vst_types.h:115
int vst_version
Definition: vst_types.h:100
pthread_cond_t window_created
Definition: vst_types.h:127
struct _VSTState * next
Definition: vst_types.h:122
pthread_mutex_t state_lock
Definition: vst_types.h:124
intptr_t(* audioMasterCallback)(AEffect *, int32_t, int32_t, intptr_t, void *, float)
Definition: vestige.h:341
void vststate_maybe_set_program(VSTState *state)
void vststate_init(VSTState *state)
AEffect *(* main_entry_t)(audioMasterCallback)
Definition: vst_types.h:55