1 #ifndef PLUGINACLIENTLAD_H
2 #define PLUGINACLIENTLAD_H
4 #include "bcdisplayinfo.h"
7 #include "pluginaclient.h"
8 #include "pluginaclientlad.inc"
11 class PluginAClientConfig
14 PluginAClientConfig();
15 ~PluginAClientConfig();
17 int equivalent(PluginAClientConfig
&that
);
18 void copy_from(PluginAClientConfig
&that
);
19 void interpolate(PluginAClientConfig
&prev
,
20 PluginAClientConfig
&next
,
23 int64_t current_frame
);
25 void delete_objects();
26 // Create the port tables based on the LAD descriptor
27 void initialize(PluginServer
*server
);
29 // Need total_ports record to avoid saving default data buffer ports.
39 // Frequencies are stored in units of frequency to aid the GUI.
40 LADSPA_Data
*port_data
;
43 class PluginACLientToggle
: public BC_CheckBox
46 PluginACLientToggle(PluginAClientLAD
*plugin
,
51 PluginAClientLAD
*plugin
;
55 class PluginACLientILinear
: public BC_IPot
58 PluginACLientILinear(PluginAClientLAD
*plugin
,
65 PluginAClientLAD
*plugin
;
69 class PluginACLientFLinear
: public BC_FPot
72 PluginACLientFLinear(PluginAClientLAD
*plugin
,
79 PluginAClientLAD
*plugin
;
83 class PluginACLientFreq
: public BC_QPot
86 PluginACLientFreq(PluginAClientLAD
*plugin
,
90 int translate_linear
);
92 PluginAClientLAD
*plugin
;
94 // Decode LAD frequency table
99 class PluginAClientWindow
: public BC_Window
102 PluginAClientWindow(PluginAClientLAD
*plugin
,
105 ~PluginAClientWindow();
107 int create_objects();
112 ArrayList
<PluginACLientToggle
*> toggles
;
113 ArrayList
<PluginACLientILinear
*> ipots
;
114 ArrayList
<PluginACLientFLinear
*> fpots
;
115 ArrayList
<PluginACLientFreq
*> freqs
;
117 PluginAClientLAD
*plugin
;
120 PLUGIN_THREAD_HEADER(PluginAClientLAD
, PluginAClientThread
, PluginAClientWindow
)
122 class PluginAClientLAD
: public PluginAClient
125 PluginAClientLAD(PluginServer
*server
);
128 int process_realtime(int64_t size
,
131 int process_realtime(int64_t size
,
133 double **output_ptr
);
134 // Update output pointers as well
137 int is_multichannel();
142 void save_data(KeyFrame
*keyframe
);
143 void read_data(KeyFrame
*keyframe
);
145 PLUGIN_CLASS_MEMBERS(PluginAClientConfig
, PluginAClientThread
)
148 static char* lad_to_string(char *string
, char *input
);
149 static char* lad_to_upper(char *string
, char *input
);
150 int get_inchannels();
151 int get_outchannels();
152 void delete_buffers();
153 void delete_plugin();
154 void init_plugin(int total_in
, int total_out
, int size
);
156 // Temporaries for LAD data
157 LADSPA_Data
**in_buffers
;
159 LADSPA_Data
**out_buffers
;
160 int total_outbuffers
;
161 int buffer_allocation
;
162 LADSPA_Handle lad_instance
;
163 LADSPA_Data dummy_control_output
;
170 // c-file-style: "linux"