doc: note about python 3 in NEWS file
[jack_mixer.git] / jack_mixer.h
blob2903f9034d15bed22849a918ed8f6f5aaff68279
1 /* -*- Mode: C ; c-basic-offset: 2 -*- */
2 /*****************************************************************************
4 * This file is part of jack_mixer
6 * Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name>
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
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.
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.
21 *****************************************************************************/
23 #ifndef JACK_MIXER_H__DAEB51D8_5861_40F2_92E4_24CA495A384D__INCLUDED
24 #define JACK_MIXER_H__DAEB51D8_5861_40F2_92E4_24CA495A384D__INCLUDED
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 };
31 #include <stdbool.h>
32 #include "jack_mixer.h"
34 #endif
36 typedef void * jack_mixer_t;
37 typedef void * jack_mixer_channel_t;
38 typedef void * jack_mixer_output_channel_t;
39 typedef void * jack_mixer_scale_t;
40 typedef void * jack_mixer_threshold_t;
42 jack_mixer_t
43 create(
44 const char * jack_client_name_ptr,
45 bool stereo);
47 void
48 destroy(
49 jack_mixer_t mixer);
51 unsigned int
52 get_channels_count(
53 jack_mixer_t mixer);
55 const char*
56 get_client_name(
57 jack_mixer_t mixer);
59 int
60 get_last_midi_channel(
61 jack_mixer_t mixer);
63 unsigned int
64 set_last_midi_channel(
65 jack_mixer_t mixer,
66 int new_channel);
68 jack_mixer_channel_t
69 add_channel(
70 jack_mixer_t mixer,
71 const char * channel_name,
72 bool stereo);
74 const char *
75 channel_get_name(
76 jack_mixer_channel_t channel);
78 /* returned values are in dBFS */
79 void
80 channel_stereo_meter_read(
81 jack_mixer_channel_t channel,
82 double * left_ptr,
83 double * right_ptr);
85 /* returned value is in dBFS */
86 void
87 channel_mono_meter_read(
88 jack_mixer_channel_t channel,
89 double * mono_ptr);
91 bool
92 channel_is_stereo(
93 jack_mixer_channel_t channel);
95 void
96 channel_set_midi_change_callback(
97 jack_mixer_channel_t channel,
98 void (*midi_change_callback) (void*),
99 void *user_data);
101 /* volume is in dBFS */
102 void
103 channel_volume_write(
104 jack_mixer_channel_t channel,
105 double volume);
107 double
108 channel_volume_read(
109 jack_mixer_channel_t channel);
111 /* balance is from -1.0 (full left) to +1.0 (full right) */
112 void
113 channel_balance_write(
114 jack_mixer_channel_t channel,
115 double balance);
117 double
118 channel_balance_read(
119 jack_mixer_channel_t channel);
122 channel_get_balance_midi_cc(
123 jack_mixer_channel_t channel);
125 unsigned int
126 channel_set_balance_midi_cc(
127 jack_mixer_channel_t channel,
128 int new_cc);
131 channel_get_volume_midi_cc(
132 jack_mixer_channel_t channel);
134 unsigned int
135 channel_set_volume_midi_cc(
136 jack_mixer_channel_t channel,
137 int new_cc);
140 channel_get_mute_midi_cc(
141 jack_mixer_channel_t channel);
143 unsigned int
144 channel_set_mute_midi_cc(
145 jack_mixer_channel_t channel,
146 int new_cc);
149 channel_get_solo_midi_cc(
150 jack_mixer_channel_t channel);
152 unsigned int
153 channel_set_solo_midi_cc(
154 jack_mixer_channel_t channel,
155 int new_cc);
157 void
158 channel_autoset_midi_cc(
159 jack_mixer_channel_t channel);
161 void
162 remove_channel(
163 jack_mixer_channel_t channel);
165 /* returned value is in dBFS */
166 double
167 channel_abspeak_read(
168 jack_mixer_channel_t channel);
170 void
171 channel_abspeak_reset(
172 jack_mixer_channel_t channel);
174 void
175 channel_out_mute(
176 jack_mixer_channel_t channel);
178 void
179 channel_out_unmute(
180 jack_mixer_channel_t channel);
182 bool
183 channel_is_out_muted(
184 jack_mixer_channel_t channel);
186 void
187 channel_solo(
188 jack_mixer_channel_t channel);
190 void
191 channel_unsolo(
192 jack_mixer_channel_t channel);
194 bool
195 channel_is_soloed(
196 jack_mixer_channel_t channel);
198 void
199 channel_rename(
200 jack_mixer_channel_t channel,
201 const char * name);
203 void
204 channel_set_midi_scale(
205 jack_mixer_channel_t channel,
206 jack_mixer_scale_t scale);
208 bool
209 channel_get_midi_in_got_events(
210 jack_mixer_channel_t channel);
212 jack_mixer_scale_t
213 scale_create();
215 bool
216 scale_add_threshold(
217 jack_mixer_scale_t scale,
218 float db,
219 float scale_value);
221 void
222 scale_calculate_coefficients(
223 jack_mixer_scale_t scale);
225 double
226 scale_db_to_scale(
227 jack_mixer_scale_t scale,
228 double db);
230 double
231 scale_scale_to_db(
232 jack_mixer_scale_t scale,
233 double scale_value);
235 void
236 scale_destroy(
237 jack_mixer_scale_t scale);
239 jack_mixer_output_channel_t
240 add_output_channel(
241 jack_mixer_t mixer,
242 const char * channel_name,
243 bool stereo,
244 bool system);
246 void
247 remove_output_channel(
248 jack_mixer_output_channel_t output_channel);
250 void
251 output_channel_set_solo(
252 jack_mixer_output_channel_t output_channel,
253 jack_mixer_channel_t channel,
254 bool solo_value);
256 void
257 output_channel_set_muted(
258 jack_mixer_output_channel_t output_channel,
259 jack_mixer_channel_t channel,
260 bool muted_value);
262 bool
263 output_channel_is_muted(
264 jack_mixer_output_channel_t output_channel,
265 jack_mixer_channel_t channel);
267 bool
268 output_channel_is_solo(
269 jack_mixer_output_channel_t output_channel,
270 jack_mixer_channel_t channel);
272 void
273 output_channel_set_prefader(
274 jack_mixer_output_channel_t output_channel,
275 bool pfl_value);
277 bool
278 output_channel_is_prefader(
279 jack_mixer_output_channel_t output_channel);
281 #endif /* #ifndef JACK_MIXER_H__DAEB51D8_5861_40F2_92E4_24CA495A384D__INCLUDED */