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