00001 #ifndef DELAYAUDIO_H 00002 #define DELAYAUDIO_H 00003 00004 #include "bchash.inc" 00005 #include "guicast.h" 00006 #include "mutex.h" 00007 #include "pluginaclient.h" 00008 #include "vframe.inc" 00009 00010 00011 00012 class DelayAudio; 00013 class DelayAudioWindow; 00014 class DelayAudioTextBox; 00015 00016 00017 00018 00019 class DelayAudioConfig 00020 { 00021 public: 00022 DelayAudioConfig(); 00023 00024 int equivalent(DelayAudioConfig &that); 00025 void copy_from(DelayAudioConfig &that); 00026 double length; 00027 }; 00028 00029 00030 00031 class DelayAudioThread : public Thread 00032 { 00033 public: 00034 DelayAudioThread(DelayAudio *plugin); 00035 ~DelayAudioThread(); 00036 00037 void run(); 00038 00039 Mutex completion; 00040 DelayAudioWindow *window; 00041 DelayAudio *plugin; 00042 }; 00043 00044 00045 00046 class DelayAudioWindow : public BC_Window 00047 { 00048 public: 00049 DelayAudioWindow(DelayAudio *plugin, int x, int y); 00050 ~DelayAudioWindow(); 00051 00052 int create_objects(); 00053 int close_event(); 00054 void update_gui(); 00055 00056 DelayAudio *plugin; 00057 DelayAudioTextBox *length; 00058 }; 00059 00060 00061 00062 00063 class DelayAudioTextBox : public BC_TextBox 00064 { 00065 public: 00066 DelayAudioTextBox(DelayAudio *plugin, int x, int y); 00067 ~DelayAudioTextBox(); 00068 00069 int handle_event(); 00070 00071 DelayAudio *plugin; 00072 }; 00073 00074 00075 00076 00077 class DelayAudio : public PluginAClient 00078 { 00079 public: 00080 DelayAudio(PluginServer *server); 00081 ~DelayAudio(); 00082 00083 VFrame* new_picon(); 00084 char* plugin_title(); 00085 int is_realtime(); 00086 int load_defaults(); 00087 int save_defaults(); 00088 void read_data(KeyFrame *keyframe); 00089 void save_data(KeyFrame *keyframe); 00090 int process_realtime(int64_t size, double *input_ptr, double *output_ptr); 00091 int show_gui(); 00092 void raise_window(); 00093 int set_string(); 00094 00095 00096 00097 00098 00099 void load_configuration(); 00100 void reset(); 00101 void reconfigure(); 00102 void update_gui(); 00103 00104 00105 00106 double *buffer; 00107 int64_t allocation; 00108 int64_t input_start; 00109 int need_reconfigure; 00110 DelayAudioThread *thread; 00111 BC_Hash *defaults; 00112 DelayAudioConfig config; 00113 }; 00114 00115 00116 00117 00118 #endif
1.5.5