added jackrack filter
[melted] / src / modules / jackrack / plugin_settings.h
1 /*
2 * JACK Rack
3 *
4 * Copyright (C) Robert Ham 2003 (node@users.sourceforge.net)
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21 #ifndef __JR_PLUGIN_SETTINGS_H__
22 #define __JR_PLUGIN_SETTINGS_H__
23
24 #include <glib.h>
25 #include <ladspa.h>
26
27 #include "plugin_mgr.h"
28 #include "plugin_desc.h"
29
30 typedef struct _settings settings_t;
31
32 struct _settings
33 {
34 guint32 sample_rate;
35 plugin_desc_t * desc;
36 guint copies;
37 LADSPA_Data ** control_values;
38 gboolean * locks;
39 gboolean lock_all;
40 gboolean enabled;
41 unsigned long channels;
42 gboolean wet_dry_enabled;
43 gboolean wet_dry_locked;
44 LADSPA_Data * wet_dry_values;
45 };
46
47 settings_t * settings_new (plugin_desc_t * desc, unsigned long channels, guint32 sample_rate);
48 settings_t * settings_dup (settings_t * settings);
49 void settings_destroy (settings_t * settings);
50
51 void settings_set_control_value (settings_t * settings, guint copy, unsigned long control_index, LADSPA_Data value);
52 void settings_set_lock (settings_t * settings, unsigned long control_index, gboolean locked);
53 void settings_set_lock_all (settings_t * settings, gboolean lock_all);
54 void settings_set_enabled (settings_t * settings, gboolean enabled);
55 void settings_set_wet_dry_enabled (settings_t * settings, gboolean enabled);
56 void settings_set_wet_dry_locked (settings_t * settings, gboolean locked);
57 void settings_set_wet_dry_value (settings_t * settings, unsigned long channel, LADSPA_Data value);
58
59 LADSPA_Data settings_get_control_value (settings_t * settings, guint copy, unsigned long control_index);
60 gboolean settings_get_lock (const settings_t * settings, unsigned long control_index);
61 gboolean settings_get_lock_all (const settings_t * settings);
62 gboolean settings_get_enabled (const settings_t * settings);
63 guint settings_get_copies (const settings_t * settings);
64 unsigned long settings_get_channels (const settings_t * settings);
65 gboolean settings_get_wet_dry_enabled (const settings_t * settings);
66 gboolean settings_get_wet_dry_locked (const settings_t * settings);
67 LADSPA_Data settings_get_wet_dry_value (settings_t * settings, unsigned long channel);
68
69 void settings_set_sample_rate (settings_t * settings, guint32 sample_rate);
70
71 #endif /* __JR_PLUGIN_SETTINGS_H__ */