.gitignore generated files
[jack_mixer.git] / jack_mixer.h
bloba4f95bd98ff37c4766a3857ddab66c56ba6e04ec
1 /* -*- Mode: C ; c-basic-offset: 2 -*- */
2 /*****************************************************************************
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
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_scale_t;
39 typedef void * jack_mixer_threshold_t;
41 jack_mixer_t
42 create(
43 const char * jack_client_name_ptr);
45 void
46 destroy(
47 jack_mixer_t mixer);
49 jack_mixer_channel_t
50 get_main_mix_channel(
51 jack_mixer_t mixer);
53 unsigned int
54 get_channels_count(
55 jack_mixer_t mixer);
57 jack_mixer_channel_t
58 add_channel(
59 jack_mixer_t mixer,
60 const char * channel_name,
61 bool stereo);
63 const char *
64 channel_get_name(
65 jack_mixer_channel_t channel);
67 /* returned values are in dBFS */
68 void
69 channel_stereo_meter_read(
70 jack_mixer_channel_t channel,
71 double * left_ptr,
72 double * right_ptr);
74 /* returned value is in dBFS */
75 void
76 channel_mono_meter_read(
77 jack_mixer_channel_t channel,
78 double * mono_ptr);
80 bool
81 channel_is_stereo(
82 jack_mixer_channel_t channel);
84 bool
85 channel_is_midi_modified(
86 jack_mixer_channel_t channel);
88 /* volume is in dBFS */
89 void
90 channel_volume_write(
91 jack_mixer_channel_t channel,
92 double volume);
94 double
95 channel_volume_read(
96 jack_mixer_channel_t channel);
98 /* balance is from -1.0 (full left) to +1.0 (full right) */
99 void
100 channel_balance_write(
101 jack_mixer_channel_t channel,
102 double balance);
104 double
105 channel_balance_read(
106 jack_mixer_channel_t channel);
108 void
109 remove_channel(
110 jack_mixer_channel_t channel);
112 /* returned value is in dBFS */
113 double
114 channel_abspeak_read(
115 jack_mixer_channel_t channel);
117 void
118 channel_abspeak_reset(
119 jack_mixer_channel_t channel);
121 void
122 channel_mute(
123 jack_mixer_channel_t channel);
125 void
126 channel_unmute(
127 jack_mixer_channel_t channel);
129 void
130 channel_solo(
131 jack_mixer_channel_t channel);
133 void
134 channel_unsolo(
135 jack_mixer_channel_t channel);
137 bool
138 channel_is_muted(
139 jack_mixer_channel_t channel);
141 bool
142 channel_is_soloed(
143 jack_mixer_channel_t channel);
145 void
146 channel_rename(
147 jack_mixer_channel_t channel,
148 const char * name);
150 void
151 channel_set_midi_scale(
152 jack_mixer_channel_t channel,
153 jack_mixer_scale_t scale);
155 jack_mixer_scale_t
156 scale_create();
158 bool
159 scale_add_threshold(
160 jack_mixer_scale_t scale,
161 float db,
162 float scale_value);
164 void
165 scale_calculate_coefficients(
166 jack_mixer_scale_t scale);
168 double
169 scale_db_to_scale(
170 jack_mixer_scale_t scale,
171 double db);
173 double
174 scale_scale_to_db(
175 jack_mixer_scale_t scale,
176 double scale_value);
178 void
179 scale_destroy(
180 jack_mixer_scale_t scale);
182 #endif /* #ifndef JACK_MIXER_H__DAEB51D8_5861_40F2_92E4_24CA495A384D__INCLUDED */