1 /* 2 * Copyright (C) 2005 Andres Cabrera 3 * The dssi4cs library is free software; you can redistribute it 4 * and/or modify it under the terms of the GNU Lesser General Public 5 * License as published by the Free Software Foundation; either 6 * version 2.1 of the License, or (at your option) any later version. 7 * 8 * The dssi4cs library is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU Lesser General Public License for more details. 12 * 13 * You should have received a copy of the GNU Lesser General Public 14 * License along with The dssi4cs library; if not, write to the Free Software 15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 16 * 02110-1301 USA 17 */ 18 19 #ifndef DSSI4CS_H 20 #define DSSI4CS_H 21 22 #include "csdl.h" 23 #include "dssi.h" 24 25 /* When changing these remember to change dssiaudio function */ 26 #define DSSI4CS_MAX_IN_CHANNELS 9 27 #define DSSI4CS_MAX_OUT_CHANNELS 9 28 29 enum PluginType {LADSPA, DSSI}; 30 31 typedef struct DSSI4CS_PLUGIN_ { 32 const LADSPA_Descriptor * Descriptor; 33 const DSSI_Descriptor * DSSIDescriptor; 34 /* For Type 1=LADSPA 2=DSSI */ 35 enum PluginType Type; 36 LADSPA_Handle Handle; 37 int32_t Active; 38 LADSPA_Data ** control; 39 LADSPA_Data ** audio; 40 snd_seq_event_t *Events; 41 uint64_t EventCount; 42 int32_t PluginNumber; 43 int32_t * PluginCount; 44 void * NextPlugin; 45 /* float * kinputs_[]; */ 46 /* float * koutputs_[]; */ 47 } DSSI4CS_PLUGIN; 48 49 typedef struct DSSIINIT_ { 50 OPDS h; 51 /* Inputs. */ 52 MYFLT *iDSSIHandle; 53 MYFLT *iplugin; 54 MYFLT *iindex; 55 MYFLT *iverbose; 56 } DSSIINIT ; 57 58 typedef struct DSSIACTIVATE_ { 59 OPDS h; 60 MYFLT *iDSSIhandle; 61 MYFLT *ktrigger; 62 int32_t printflag; 63 DSSI4CS_PLUGIN * DSSIPlugin_; 64 } DSSIACTIVATE ; 65 66 typedef struct DSSIAUDIO_ { 67 OPDS h; 68 /* Outputs. */ 69 MYFLT *aout[DSSI4CS_MAX_OUT_CHANNELS]; 70 /* Inputs. */ 71 MYFLT *iDSSIhandle; 72 MYFLT *ain[DSSI4CS_MAX_IN_CHANNELS]; 73 /* MYFLT *ain1; */ 74 /* MYFLT *ain2; */ 75 /* MYFLT *ain3; */ 76 /* MYFLT *ain4; */ 77 int32_t NumInputPorts; 78 int32_t NumOutputPorts; 79 uint64_t * InputPorts; 80 uint64_t * OutputPorts; 81 DSSI4CS_PLUGIN * DSSIPlugin_; 82 /* State. */ 83 /* size_t framesPerBlock; */ 84 /* size_t channels; */ 85 } DSSIAUDIO ; 86 87 typedef struct DSSICTLS_ { 88 OPDS h; 89 MYFLT *iDSSIhandle; 90 MYFLT *iport; 91 MYFLT *val; 92 MYFLT *ktrig; 93 /* float *Data; */ 94 uint64_t PortNumber; 95 int32_t HintSampleRate; 96 DSSI4CS_PLUGIN * DSSIPlugin_; 97 } DSSICTLS; 98 99 typedef struct DSSISYNTH_ { 100 OPDS h; 101 MYFLT *aout[DSSI4CS_MAX_OUT_CHANNELS]; 102 /* Inputs. */ 103 MYFLT *iDSSIhandle; 104 int32_t NumInputPorts; 105 int32_t NumOutputPorts; 106 uint64_t * InputPorts; 107 uint64_t * OutputPorts; 108 DSSI4CS_PLUGIN * DSSIPlugin_; 109 } DSSISYNTH; 110 111 typedef struct DSSINOTE_ { 112 OPDS h; 113 /* Inputs. */ 114 MYFLT *ktrigger; 115 MYFLT *iDSSIhandle; 116 MYFLT *knote; 117 MYFLT *kveloc; 118 MYFLT *kdur; 119 } DSSINOTE; 120 121 typedef struct DSSINOTEON_ { 122 OPDS h; 123 /* Inputs. */ 124 MYFLT *ktrigger; 125 MYFLT *iDSSIhandle; 126 MYFLT *knote; 127 MYFLT *kveloc; 128 } DSSINOTEON; 129 130 typedef struct DSSINOTEOFF_ { 131 OPDS h; 132 /* Inputs. */ 133 MYFLT *ktrigger; 134 MYFLT *iDSSIhandle; 135 MYFLT *knote; 136 MYFLT *kveloc; 137 } DSSINOTEOFF; 138 139 typedef struct DSSIPGMCH_ { 140 OPDS h; 141 /* Inputs. */ 142 MYFLT *ktrigger; 143 MYFLT *iDSSIhandle; 144 MYFLT *kprogram; 145 MYFLT *kbank; 146 } DSSIPGMCH; 147 148 typedef struct DSSILIST_ { 149 OPDS h; 150 } DSSILIST ; 151 152 #endif 153 154