Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
bseladspa.hh
Go to the documentation of this file.
1  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
2 #ifndef __BSE_LADSPA_H__
3 #define __BSE_LADSPA_H__
4 
5 #include <bse/bseutils.hh>
6 #include <gmodule.h>
7 
8 /* --- object type macros --- */
9 #define BSE_TYPE_LADSPA_PLUGIN (BSE_TYPE_ID (BseLadspaPlugin))
10 #define BSE_LADSPA_PLUGIN(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), BSE_TYPE_LADSPA_PLUGIN, BseLadspaPlugin))
11 #define BSE_LADSPA_PLUGIN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), BSE_TYPE_LADSPA_PLUGIN, BseLadspaPluginClass))
12 #define BSE_IS_LADSPA_PLUGIN(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), BSE_TYPE_LADSPA_PLUGIN))
13 #define BSE_IS_LADSPA_PLUGIN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), BSE_TYPE_LADSPA_PLUGIN))
14 #define BSE_LADSPA_PLUGIN_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), BSE_TYPE_LADSPA_PLUGIN, BseLadspaPluginClass))
15 
16 
17 /* --- BseLadspaPlugin --- */
18 struct BseLadspaInfo;
19 typedef struct {
20  GType type;
23 struct BseLadspaPlugin : GObject {
24  gchar *fname;
25  GModule *gmodule;
26  guint use_count;
27  guint n_types;
28  BseLadspaTypeInfo *types;
29 };
30 struct BseLadspaPluginClass : GObjectClass
31 {};
32 struct BseLadspaPort {
33  gchar *ident;
34  const gchar *name;
35  gfloat minimum;
36  gfloat default_value;
37  gfloat maximum;
38  guint port_index;
39  guint audio_channel : 1;
40  guint input : 1;
41  guint output : 1;
42  guint boolean : 1;
43  guint integer_stepping : 1;
44  guint rate_relative : 1; /* sample rate relative values */
45  guint frequency : 1; /* provide logarithmic frequency slider */
46  guint logarithmic : 1;
47  guint concert_a : 1; /* default to 440Hz concert A */
48 };
49 struct BseLadspaInfo {
50  gchar *file_path; /* fully qualified file path and name */
51  gchar *ident; /* unique identifier */
52  guint plugin_id; /* unique plugin type ID */
53  const gchar *name; /* descriptive name */
54  const gchar *author;
55  const gchar *copyright;
56  guint broken : 1;
57  guint interactive : 1; /* low-latency request */
58  guint rt_capable : 1; /* hard realtime capability */
59  guint n_cports;
60  BseLadspaPort *cports;
61  guint n_aports;
62  BseLadspaPort *aports;
63  gconstpointer descdata;
64  gpointer (*instantiate) (gconstpointer descdata,
65  gulong sample_rate);
66  void (*connect_port) (gpointer instance,
67  gulong port_index,
68  gfloat *location);
69  void (*activate) (gpointer instance);
70  void (*run) (gpointer instance,
71  gulong n_samples);
72  void (*deactivate) (gpointer instance);
73  void (*cleanup) (gpointer instance);
74 };
75 
76 BseLadspaInfo* bse_ladspa_info_assemble (const gchar *file_path,
77  gconstpointer ladspa_descriptor);
78 void bse_ladspa_info_free (BseLadspaInfo *bli);
79 SfiRing* bse_ladspa_plugin_path_list_files (void);
80 const gchar* bse_ladspa_plugin_check_load (const gchar *file_name);
81 gchar* bse_ladspa_info_port_2str (BseLadspaPort *port);
82 
83 #endif /* __BSE_LADSPA_H__ */
Definition: bseladspa.hh:19
Definition: bseladspa.hh:30
int run()
Definition: bseladspa.hh:23
Definition: bseladspa.hh:49
void info(const char *format, const Args &...args)
Issue an informative printf-like message.
Definition: bcore.hh:135
Definition: bseladspa.hh:32
Definition: sfiring.hh:21