Ardour  9.0-pre0-582-g084a23a80d
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 #pragma once
22 
23 #include <pthread.h>
25 #include "ardour/vestige/vestige.h"
26 
27 #ifdef MACVST_SUPPORT
28 #include <Carbon/Carbon.h>
29 
30 /* fix up stupid apple macros */
31 #undef check
32 #undef require
33 #undef verify
34 
35 #ifdef YES
36 #undef YES
37 #endif
38 #ifdef NO
39 #undef NO
40 #endif
41 
42 #endif
43 
45 {
47  int special;
49  int character;
50 };
51 
52 typedef struct _VSTKey VSTKey;
53 
54 typedef AEffect * (* main_entry_t) (audioMasterCallback);
55 
57 {
58 #ifdef MACVST_SUPPORT
59  CFBundleRef bundleRef;
60  CFBundleRefNum res_file_id;
61 #else
62  void* dll;
63 #endif
64 
65  char* name;
66  char* path;
68  int plugincnt;
69 };
70 
71 typedef struct _VSTHandle VSTHandle;
72 
74 {
78 
80  int xid;
81 
82  /* LXVST/X11 */
85  void (* eventProc) (void * event);
86 
87  /* Windows */
89 
90 
91  int width;
92  int height;
93  int wantIdle;
94 
95  int voffset;
96  int hoffset;
97  int gui_shown;
98  int destroy;
101 
106  unsigned char* wanted_chunk;
108  float* want_params;
109  float* set_params;
110 
111  VSTKey pending_keys[16];
112 
120 
121  struct _VSTState* next;
122  pthread_mutex_t lock;
123  pthread_mutex_t state_lock;
124  pthread_cond_t window_status_change;
125  pthread_cond_t plugin_dispatcher_called;
126  pthread_cond_t window_created;
128 };
129 
130 typedef struct _VSTState VSTState;
131 
132 #ifdef __cplusplus
133 extern "C" {
134 #endif
135 LIBARDOUR_API extern void vststate_init (VSTState* state);
137 #ifdef __cplusplus
138 }
139 #endif
140 
#define LIBARDOUR_API
void * dll
Definition: vst_types.h:62
char * path
Definition: vst_types.h:66
char * name
Definition: vst_types.h:65
main_entry_t main_entry
Definition: vst_types.h:67
int plugincnt
Definition: vst_types.h:68
int character
Definition: vst_types.h:49
int special
Definition: vst_types.h:47
int dispatcher_retval
Definition: vst_types.h:119
void * gtk_window_parent
Definition: vst_types.h:79
int dispatcher_wantcall
Definition: vst_types.h:113
VSTHandle * handle
Definition: vst_types.h:76
int n_pending_keys
Definition: vst_types.h:105
int linux_window
The plugin's parent X11 XWindow.
Definition: vst_types.h:83
pthread_mutex_t lock
Definition: vst_types.h:122
pthread_cond_t window_status_change
Definition: vst_types.h:124
int destroy
Definition: vst_types.h:98
unsigned char * wanted_chunk
Definition: vst_types.h:106
int gui_shown
Definition: vst_types.h:97
int wanted_chunk_size
Definition: vst_types.h:107
int want_program
Definition: vst_types.h:103
int dispatcher_index
Definition: vst_types.h:115
float * set_params
Definition: vst_types.h:109
int has_editor
Definition: vst_types.h:100
int height
Definition: vst_types.h:92
void * windows_window
Definition: vst_types.h:88
int want_chunk
Definition: vst_types.h:104
AEffect * plugin
Definition: vst_types.h:75
int wantIdle
Definition: vst_types.h:93
int dispatcher_val
Definition: vst_types.h:116
int program_set_without_editor
Definition: vst_types.h:102
int been_activated
Definition: vst_types.h:127
float dispatcher_opt
Definition: vst_types.h:118
void * dispatcher_ptr
Definition: vst_types.h:117
int voffset
Definition: vst_types.h:95
float * want_params
Definition: vst_types.h:108
pthread_cond_t plugin_dispatcher_called
Definition: vst_types.h:125
int width
Definition: vst_types.h:91
int linux_plugin_ui_window
The ID of the plugin UI window created by the plugin.
Definition: vst_types.h:84
int hoffset
Definition: vst_types.h:96
int xid
X11 XWindow (wine + lxvst)
Definition: vst_types.h:80
audioMasterCallback amc
Definition: vst_types.h:77
int dispatcher_opcode
Definition: vst_types.h:114
int vst_version
Definition: vst_types.h:99
pthread_cond_t window_created
Definition: vst_types.h:126
struct _VSTState * next
Definition: vst_types.h:121
pthread_mutex_t state_lock
Definition: vst_types.h:123
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:54