1 /* GSequencer - Advanced GTK Sequencer
2  * Copyright (C) 2005-2021 Joël Krähemann
3  *
4  * This file is part of GSequencer.
5  *
6  * GSequencer 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 3 of the License, or
9  * (at your option) any later version.
10  *
11  * GSequencer 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
17  * along with GSequencer.  If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef __AGS_VST_ICOMPONENT_H__
21 #define __AGS_VST_ICOMPONENT_H__
22 
23 #include <glib.h>
24 
25 #include <ags/vst3-capi/pluginterfaces/base/ags_vst_iplugin_base.h>
26 #include <ags/vst3-capi/pluginterfaces/base/ags_vst_ibstream.h>
27 #include <ags/vst3-capi/pluginterfaces/vst/ags_vst_types.h>
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33   typedef struct IComponent AgsVstIComponent;
34 
35   typedef struct BusInfo AgsVstBusInfo;
36 
37   typedef struct RoutingInfo AgsVstRoutingInfo;
38 
39   typedef enum{
40     AGS_VST_KAUDIO = 0,
41     AGS_VST_KEVENT,
42     AGS_VST_KNUM_MEDIA_TYPES
43   }AgsVstMediaTypes;
44 
45   typedef enum
46   {
47     AGS_VST_KINPUT = 0,
48     AGS_VST_KOUTPUT
49   }AgsVstBusDirections;
50 
51   typedef enum
52   {
53     AGS_VST_KMAIN = 0,
54     AGS_VST_KAUX
55   }AgsVstBusTypes;
56 
57   typedef enum
58   {
59     AGS_VST_KDEFAULT_ACTIVE     = 1,
60     AGS_VST_KIS_CONTROL_VOLTAGE = 1 << 1
61   }AgsVstBusFlags;
62 
63   typedef enum
64   {
65     AGS_VST_KSIMPLE = 0,
66     AGS_VST_KADVANCED,
67     AGS_vST_KOFFLINE_PROCESSING
68   }AgsVstIoModes;
69 
70   extern const gint32 ags_vst_kdefault_factory_flags;
71 
72   const AgsVstTUID* ags_vst_icomponent_get_iid();
73 
74   AgsVstTResult ags_vst_icomponent_get_controller_class_id(AgsVstIComponent *icomponent, AgsVstTUID *class_id);
75 
76   AgsVstTResult ags_vst_icomponent_set_io_mode(AgsVstIComponent *icomponent, guint io_mode);
77 
78   gint32 ags_vst_icomponent_get_bus_count(AgsVstIComponent *icomponent,
79 					  guint type, guint dir);
80 
81   AgsVstTResult ags_vst_icomponent_get_bus_info(AgsVstIComponent *icomponent,
82 						guint type, guint dir,
83 						gint32 index,
84 						AgsVstBusInfo *bus);
85 
86   AgsVstTResult ags_vst_icomponent_get_routing_info(AgsVstIComponent *icomponent,
87 						    AgsVstRoutingInfo *in_info, AgsVstRoutingInfo *out_info);
88 
89   AgsVstTResult ags_vst_icomponent_activate_bus(AgsVstIComponent *icomponent,
90 						guint type, guint dir,
91 						gint32 index,
92 						gboolean state);
93 
94   AgsVstTResult ags_vst_icomponent_set_active(AgsVstIComponent *icomponent,
95 					      gboolean state);
96 
97   AgsVstTResult ags_vst_icomponent_set_state(AgsVstIComponent *icomponent,
98 					     AgsVstIBStream *state);
99   AgsVstTResult ags_vst_icomponent_get_state(AgsVstIComponent *icomponent,
100 					     AgsVstIBStream *state);
101 
102 #ifdef __cplusplus
103 }
104 #endif
105 
106 #endif /*__AGS_VST_ICOMPONENT_H__*/
107