06c3439e6686184ab74d8216679453d3aab5c8fd
[melted] / src / modules / jackrack / jack_rack.h
1 /*
2 * JACK Rack
3 *
4 * Copyright (C) Robert Ham 2002, 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_JACK_RACK_H__
22 #define __JR_JACK_RACK_H__
23
24 #include <glib.h>
25 #include <ladspa.h>
26
27 #include "plugin.h"
28 #include "plugin_mgr.h"
29 #include "plugin_settings.h"
30 #include "process.h"
31
32 typedef struct _saved_plugin saved_plugin_t;
33
34 struct _saved_plugin
35 {
36 settings_t *settings;
37 };
38
39 typedef struct _saved_rack saved_rack_t;
40
41 struct _saved_rack
42 {
43 unsigned long channels;
44 jack_nframes_t sample_rate;
45 GSList * plugins;
46 };
47
48 typedef struct _jack_rack jack_rack_t;
49
50 struct _jack_rack
51 {
52 plugin_mgr_t * plugin_mgr;
53 process_info_t * procinfo;
54 unsigned long channels;
55 GSList * saved_plugins;
56 };
57
58 jack_rack_t * jack_rack_new (const char * client_name, unsigned long channels);
59 void jack_rack_destroy (jack_rack_t * jack_rack);
60
61 int jack_rack_open_file (jack_rack_t * jack_rack, const char * filename);
62 void jack_rack_add_plugin (jack_rack_t * jack_rack, plugin_t * plugin);
63 void jack_rack_add_saved_plugin (jack_rack_t * jack_rack, struct _saved_plugin * saved_plugin);
64
65 plugin_t * jack_rack_instantiate_plugin (jack_rack_t * jack_rack, plugin_desc_t * desc);
66
67 #endif /* __JR_JACK_RACK_H__ */