]> git.0d.be Git - jack_mixer.git/blob - jack_mixer.h
* Reflect changes caused by MIDI CCs in UI (move sliders, etc.)
[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 typedef void * jack_mixer_t;
37 typedef void * jack_mixer_channel_t;
38
39 jack_mixer_t
40 create(
41   const char * jack_client_name_ptr);
42
43 void
44 destroy(
45   jack_mixer_t mixer);
46
47 jack_mixer_channel_t
48 get_main_mix_channel(
49   jack_mixer_t mixer);
50
51 unsigned int
52 get_channels_count(
53   jack_mixer_t mixer);
54
55 jack_mixer_channel_t
56 add_channel(
57   jack_mixer_t mixer,
58   const char * channel_name,
59   bool stereo);
60
61 const char *
62 channel_get_name(
63   jack_mixer_channel_t channel);
64
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);
71
72 /* returned value is in dBFS */
73 void
74 channel_mono_meter_read(
75   jack_mixer_channel_t channel,
76   double * mono_ptr);
77
78 bool
79 channel_is_stereo(
80   jack_mixer_channel_t channel);
81
82 bool
83 channel_is_midi_modified(
84   jack_mixer_channel_t channel);
85
86 /* volume is in dBFS */
87 void
88 channel_volume_write(
89   jack_mixer_channel_t channel,
90   double volume);
91
92 float
93 channel_volume_read(
94   jack_mixer_channel_t channel);
95
96 /* balance is from -1.0 (full left) to +1.0 (full right) */
97 void
98 channel_balance_write(
99   jack_mixer_channel_t channel,
100   double balance);
101
102 float
103 channel_balance_read(
104   jack_mixer_channel_t channel);
105
106 void
107 remove_channel(
108   jack_mixer_channel_t channel);
109
110 /* returned value is in dBFS */
111 double
112 channel_abspeak_read(
113   jack_mixer_channel_t channel);
114
115 void
116 channel_abspeak_reset(
117   jack_mixer_channel_t channel);
118
119 void
120 channel_mute(
121   jack_mixer_channel_t channel);
122
123 void
124 channel_unmute(
125   jack_mixer_channel_t channel);
126
127 void
128 channel_solo(
129   jack_mixer_channel_t channel);
130
131 void
132 channel_unsolo(
133   jack_mixer_channel_t channel);
134
135 bool
136 channel_is_muted(
137   jack_mixer_channel_t channel);
138
139 bool
140 channel_is_soloed(
141   jack_mixer_channel_t channel);
142
143 void
144 channel_rename(
145   jack_mixer_channel_t channel,
146   const char * name);
147
148 #endif /* #ifndef JACK_MIXER_H__DAEB51D8_5861_40F2_92E4_24CA495A384D__INCLUDED */