Move channel buffers from stack to structs so theyt can be reused when mixing with...
[jack_mixer.git] / jack_mixer.h
bloba771b5cc66c753c5cbdcffafdf3617e15ce0e53f
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;
39 jack_mixer_t
40 create(
41 const char * jack_client_name_ptr);
43 void
44 destroy(
45 jack_mixer_t mixer);
47 jack_mixer_channel_t
48 get_main_mix_channel(
49 jack_mixer_t mixer);
51 unsigned int
52 get_channels_count(
53 jack_mixer_t mixer);
55 jack_mixer_channel_t
56 add_channel(
57 jack_mixer_t mixer,
58 const char * channel_name,
59 bool stereo);
61 const char *
62 channel_get_name(
63 jack_mixer_channel_t channel);
65 /* returned values are in dBFS */
66 void
67 channel_stereo_meter_read(
68 jack_mixer_channel_t channel,
69 double * left_ptr,
70 double * right_ptr);
72 /* returned value is in dBFS */
73 void
74 channel_mono_meter_read(
75 jack_mixer_channel_t channel,
76 double * mono_ptr);
78 bool
79 channel_is_stereo(
80 jack_mixer_channel_t channel);
82 /* volume is in dBFS */
83 void
84 channel_volume_write(
85 jack_mixer_channel_t channel,
86 double volume);
88 /* balance is from -1.0 (full left) to +1.0 (full right) */
89 void
90 channel_balance_write(
91 jack_mixer_channel_t channel,
92 double balance);
94 void
95 remove_channel(
96 jack_mixer_channel_t channel);
98 /* returned value is in dBFS */
99 double
100 channel_abspeak_read(
101 jack_mixer_channel_t channel);
103 void
104 channel_abspeak_reset(
105 jack_mixer_channel_t channel);
107 void
108 channel_mute(
109 jack_mixer_channel_t channel);
111 void
112 channel_unmute(
113 jack_mixer_channel_t channel);
115 void
116 channel_solo(
117 jack_mixer_channel_t channel);
119 void
120 channel_unsolo(
121 jack_mixer_channel_t channel);
123 bool
124 channel_is_muted(
125 jack_mixer_channel_t channel);
127 bool
128 channel_is_soloed(
129 jack_mixer_channel_t channel);
131 void
132 channel_rename(
133 jack_mixer_channel_t channel,
134 const char * name);
136 #endif /* #ifndef JACK_MIXER_H__DAEB51D8_5861_40F2_92E4_24CA495A384D__INCLUDED */