Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

pluginaclientlad.h

Go to the documentation of this file.
00001 #ifndef PLUGINACLIENTLAD_H
00002 #define PLUGINACLIENTLAD_H
00003 
00004 #include "bcdisplayinfo.h"
00005 #include "guicast.h"
00006 #include "ladspa.h"
00007 #include "pluginaclient.h"
00008 #include "pluginaclientlad.inc"
00009 
00010 
00011 class PluginAClientConfig
00012 {
00013 public:
00014         PluginAClientConfig();
00015         ~PluginAClientConfig();
00016 
00017         int equivalent(PluginAClientConfig &that);
00018         void copy_from(PluginAClientConfig &that);
00019         void interpolate(PluginAClientConfig &prev, 
00020                 PluginAClientConfig &next, 
00021                 int64_t prev_frame, 
00022                 int64_t next_frame, 
00023                 int64_t current_frame);
00024         void reset();
00025         void delete_objects();
00026 // Create the port tables based on the LAD descriptor
00027         void initialize(PluginServer *server);
00028 ;
00029 //  Need total_ports record to avoid saving default data buffer ports.
00030         int total_ports;
00031         enum
00032         {
00033                 PORT_NORMAL,
00034                 PORT_FREQ_INDEX,
00035                 PORT_TOGGLE,
00036                 PORT_INTEGER
00037         };
00038         int *port_type;
00039 // Frequencies are stored in units of frequency to aid the GUI.
00040         LADSPA_Data *port_data;
00041 };
00042 
00043 class PluginACLientToggle : public BC_CheckBox
00044 {
00045 public:
00046         PluginACLientToggle(PluginAClientLAD *plugin,
00047                 int x,
00048                 int y,
00049                 LADSPA_Data *output);
00050         int handle_event();
00051         PluginAClientLAD *plugin;
00052         LADSPA_Data *output;
00053 };
00054 
00055 class PluginACLientILinear : public BC_IPot
00056 {
00057 public:
00058         PluginACLientILinear(PluginAClientLAD *plugin,
00059                 int x,
00060                 int y,
00061                 LADSPA_Data *output,
00062                 int min,
00063                 int max);
00064         int handle_event();
00065         PluginAClientLAD *plugin;
00066         LADSPA_Data *output;
00067 };
00068 
00069 class PluginACLientFLinear : public BC_FPot
00070 {
00071 public:
00072         PluginACLientFLinear(PluginAClientLAD *plugin,
00073                 int x,
00074                 int y,
00075                 LADSPA_Data *output,
00076                 float min,
00077                 float max);
00078         int handle_event();
00079         PluginAClientLAD *plugin;
00080         LADSPA_Data *output;
00081 };
00082 
00083 class PluginACLientFreq : public BC_QPot
00084 {
00085 public:
00086         PluginACLientFreq(PluginAClientLAD *plugin,
00087                 int x,
00088                 int y,
00089                 LADSPA_Data *output,
00090                 int translate_linear);
00091         int handle_event();
00092         PluginAClientLAD *plugin;
00093         LADSPA_Data *output;
00094 // Decode LAD frequency table
00095         int translate_linear;
00096 };
00097 
00098 
00099 class PluginAClientWindow : public BC_Window
00100 {
00101 public:
00102         PluginAClientWindow(PluginAClientLAD *plugin, 
00103                 int x, 
00104                 int y);
00105         ~PluginAClientWindow();
00106         
00107         int create_objects();
00108         int close_event();
00109 
00110 
00111 
00112         ArrayList<PluginACLientToggle*> toggles;
00113         ArrayList<PluginACLientILinear*> ipots;
00114         ArrayList<PluginACLientFLinear*> fpots;
00115         ArrayList<PluginACLientFreq*> freqs;
00116 
00117         PluginAClientLAD *plugin;
00118 };
00119 
00120 PLUGIN_THREAD_HEADER(PluginAClientLAD, PluginAClientThread, PluginAClientWindow)
00121 
00122 class PluginAClientLAD : public PluginAClient
00123 {
00124 public:
00125         PluginAClientLAD(PluginServer *server);
00126         ~PluginAClientLAD();
00127 
00128         int process_realtime(int64_t size, 
00129                 double *input_ptr, 
00130                 double *output_ptr);
00131         int process_realtime(int64_t size, 
00132                 double **input_ptr, 
00133                 double **output_ptr);
00134 // Update output pointers as well
00135         void update_gui();
00136         int is_realtime();
00137         int is_multichannel();
00138         int is_synthesis();
00139         int uses_gui();
00140         int load_defaults();
00141         int save_defaults();
00142         void save_data(KeyFrame *keyframe);
00143         void read_data(KeyFrame *keyframe);
00144 
00145         PLUGIN_CLASS_MEMBERS(PluginAClientConfig, PluginAClientThread)
00146 
00147 
00148         static char* lad_to_string(char *string, char *input);
00149         static char* lad_to_upper(char *string, char *input);
00150         int get_inchannels();
00151         int get_outchannels();
00152         void delete_buffers();
00153         void delete_plugin();
00154         void init_plugin(int total_in, int total_out, int size);
00155 
00156 // Temporaries for LAD data
00157         LADSPA_Data **in_buffers;
00158         int total_inbuffers;
00159         LADSPA_Data **out_buffers;
00160         int total_outbuffers;
00161         int buffer_allocation;
00162         LADSPA_Handle lad_instance;
00163         LADSPA_Data dummy_control_output;
00164 };
00165 
00166 #endif

Generated on Sun Jan 8 13:38:58 2006 for Cinelerra-svn by  doxygen 1.4.4