c9198d0c103f800b09898b3b0679621f57a6c64f
[melted] / src / modules / jackrack / plugin_desc.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_PLUGIN_DESC_H__
22 #define __JR_PLUGIN_DESC_H__
23
24 #include <ladspa.h>
25 #include <glib.h>
26
27 typedef struct _plugin_desc plugin_desc_t;
28
29 struct _plugin_desc
30 {
31 char * object_file;
32 unsigned long index;
33 unsigned long id;
34 char * name;
35 LADSPA_Properties properties;
36 gboolean rt;
37
38 unsigned long channels;
39
40 gboolean aux_are_input;
41 unsigned long aux_channels;
42
43 unsigned long port_count;
44 LADSPA_PortDescriptor * port_descriptors;
45 LADSPA_PortRangeHint * port_range_hints;
46 char ** port_names;
47
48 unsigned long * audio_input_port_indicies;
49 unsigned long * audio_output_port_indicies;
50
51 unsigned long * audio_aux_port_indicies;
52
53 unsigned long control_port_count;
54 unsigned long * control_port_indicies;
55 };
56
57 plugin_desc_t * plugin_desc_new ();
58 plugin_desc_t * plugin_desc_new_with_descriptor (const char * object_file,
59 unsigned long index,
60 const LADSPA_Descriptor * descriptor);
61 void plugin_desc_destroy ();
62
63 void plugin_desc_set_object_file (plugin_desc_t * pd, const char * object_file);
64 void plugin_desc_set_index (plugin_desc_t * pd, unsigned long index);
65 void plugin_desc_set_id (plugin_desc_t * pd, unsigned long id);
66 void plugin_desc_set_name (plugin_desc_t * pd, const char * name);
67 void plugin_desc_set_properties (plugin_desc_t * pd, LADSPA_Properties properties);
68
69 struct _plugin * plugin_desc_instantiate (plugin_desc_t * pd);
70
71 LADSPA_Data plugin_desc_get_default_control_value (plugin_desc_t * pd, unsigned long port_index, guint32 sample_rate);
72 LADSPA_Data plugin_desc_change_control_value (plugin_desc_t *, unsigned long, LADSPA_Data, guint32, guint32);
73
74 gint plugin_desc_get_copies (plugin_desc_t * pd, unsigned long rack_channels);
75
76 #endif /* __JR_PLUGIN_DESC_H__ */