]> git.0d.be Git - jack_mixer.git/blob - jack_mixer.h
Merge pull request #7 from synthnassizer/mergebranch
[jack_mixer.git] / jack_mixer.h
1 /* -*- Mode: C ; c-basic-offset: 2 -*- */
2 /*****************************************************************************
3  *
4  *   This file is part of jack_mixer
5  *
6  *   Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name>
7  *
8  *   This program is free software; you can redistribute it and/or modify
9  *   it under the terms of the GNU General Public License as published by
10  *   the Free Software Foundation; version 2 of the License
11  *
12  *   This program is distributed in the hope that it will be useful,
13  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *   GNU General Public License for more details.
16  *
17  *   You should have received a copy of the GNU General Public License
18  *   along with this program; if not, write to the Free Software
19  *   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20  *
21  *****************************************************************************/
22
23 #ifndef JACK_MIXER_H__DAEB51D8_5861_40F2_92E4_24CA495A384D__INCLUDED
24 #define JACK_MIXER_H__DAEB51D8_5861_40F2_92E4_24CA495A384D__INCLUDED
25
26 #ifdef SWIG
27 %module jack_mixer_c
28 %include "typemaps.i"
29 %apply double *OUTPUT { double * left_ptr, double * right_ptr, double * mono_ptr };
30 %{
31 #include <stdbool.h>
32 #include "jack_mixer.h"
33 %}
34 #endif
35
36 #include "scale.h"
37
38 typedef void * jack_mixer_t;
39 typedef void * jack_mixer_channel_t;
40 typedef void * jack_mixer_output_channel_t;
41 typedef void * jack_mixer_threshold_t;
42
43 jack_mixer_t
44 create(
45   const char * jack_client_name_ptr,
46   bool stereo);
47
48 void
49 destroy(
50   jack_mixer_t mixer);
51
52 unsigned int
53 get_channels_count(
54   jack_mixer_t mixer);
55
56 const char*
57 get_client_name(
58   jack_mixer_t mixer);
59
60 int
61 get_last_midi_channel(
62   jack_mixer_t mixer);
63
64 unsigned int
65 set_last_midi_channel(
66   jack_mixer_t mixer,
67   int new_channel);
68
69 jack_mixer_channel_t
70 add_channel(
71   jack_mixer_t mixer,
72   const char * channel_name,
73   bool stereo);
74
75 const char *
76 channel_get_name(
77   jack_mixer_channel_t channel);
78
79 /* returned values are in dBFS */
80 void
81 channel_stereo_meter_read(
82   jack_mixer_channel_t channel,
83   double * left_ptr,
84   double * right_ptr);
85
86 /* returned value is in dBFS */
87 void
88 channel_mono_meter_read(
89   jack_mixer_channel_t channel,
90   double * mono_ptr);
91
92 bool
93 channel_is_stereo(
94   jack_mixer_channel_t channel);
95
96 void
97 channel_set_midi_change_callback(
98   jack_mixer_channel_t channel,
99   void (*midi_change_callback) (void*),
100   void *user_data);
101
102 /* volume is in dBFS */
103 void
104 channel_volume_write(
105   jack_mixer_channel_t channel,
106   double volume);
107
108 double
109 channel_volume_read(
110   jack_mixer_channel_t channel);
111
112 void
113 channels_volumes_read(jack_mixer_t mixer_ptr);
114
115 /* balance is from -1.0 (full left) to +1.0 (full right) */
116 void
117 channel_balance_write(
118   jack_mixer_channel_t channel,
119   double balance);
120
121 double
122 channel_balance_read(
123   jack_mixer_channel_t channel);
124
125 int
126 channel_get_balance_midi_cc(
127   jack_mixer_channel_t channel);
128
129 unsigned int
130 channel_set_balance_midi_cc(
131   jack_mixer_channel_t channel,
132   int new_cc);
133
134 int
135 channel_get_volume_midi_cc(
136   jack_mixer_channel_t channel);
137
138 unsigned int
139 channel_set_volume_midi_cc(
140   jack_mixer_channel_t channel,
141   int new_cc);
142
143 int
144 channel_get_mute_midi_cc(
145   jack_mixer_channel_t channel);
146
147 unsigned int
148 channel_set_mute_midi_cc(
149   jack_mixer_channel_t channel,
150   int new_cc);
151
152 int
153 channel_get_solo_midi_cc(
154   jack_mixer_channel_t channel);
155
156 unsigned int
157 channel_set_solo_midi_cc(
158   jack_mixer_channel_t channel,
159   int new_cc);
160
161 void
162 channel_autoset_midi_cc(
163   jack_mixer_channel_t channel);
164
165 void
166 remove_channel(
167   jack_mixer_channel_t channel);
168
169 void
170 remove_channels(
171   jack_mixer_t mixer);
172
173 /* returned value is in dBFS */
174 double
175 channel_abspeak_read(
176   jack_mixer_channel_t channel);
177
178 void
179 channel_abspeak_reset(
180   jack_mixer_channel_t channel);
181
182 void
183 channel_out_mute(
184   jack_mixer_channel_t channel);
185
186 void
187 channel_out_unmute(
188   jack_mixer_channel_t channel);
189
190 bool
191 channel_is_out_muted(
192   jack_mixer_channel_t channel);
193
194 void
195 channel_solo(
196   jack_mixer_channel_t channel);
197
198 void
199 channel_unsolo(
200   jack_mixer_channel_t channel);
201
202 bool
203 channel_is_soloed(
204   jack_mixer_channel_t channel);
205
206 void
207 channel_rename(
208   jack_mixer_channel_t channel,
209   const char * name);
210
211 void
212 channel_set_midi_scale(
213   jack_mixer_channel_t channel,
214   jack_mixer_scale_t scale);
215
216 bool
217 channel_get_midi_in_got_events(
218   jack_mixer_channel_t channel);
219
220 jack_mixer_output_channel_t
221 add_output_channel(
222   jack_mixer_t mixer,
223   const char * channel_name,
224   bool stereo,
225   bool system);
226
227 void
228 remove_output_channel(
229   jack_mixer_output_channel_t output_channel);
230
231 void
232 output_channel_set_solo(
233   jack_mixer_output_channel_t output_channel,
234   jack_mixer_channel_t channel,
235   bool solo_value);
236
237 void
238 output_channel_set_muted(
239   jack_mixer_output_channel_t output_channel,
240   jack_mixer_channel_t channel,
241   bool muted_value);
242
243 bool
244 output_channel_is_muted(
245   jack_mixer_output_channel_t output_channel,
246   jack_mixer_channel_t channel);
247
248 bool
249 output_channel_is_solo(
250   jack_mixer_output_channel_t output_channel,
251   jack_mixer_channel_t channel);
252
253 void
254 output_channel_set_prefader(
255   jack_mixer_output_channel_t output_channel,
256   bool pfl_value);
257
258 bool
259 output_channel_is_prefader(
260   jack_mixer_output_channel_t output_channel);
261
262 #endif /* #ifndef JACK_MIXER_H__DAEB51D8_5861_40F2_92E4_24CA495A384D__INCLUDED */