|
CLAM-Development
1.3
|
00001 00002 #ifndef _LadspaWrapper_hxx_ 00003 #define _LadspaWrapper_hxx_ 00004 00005 #include "DataTypes.hxx" 00006 #include "OutControl.hxx" 00007 #include "InControl.hxx" 00008 #include "Processing.hxx" 00009 #include "RunTimeLibraryLoader.hxx" 00010 00011 #include <ladspa.h> 00012 00013 #include <string> 00014 00015 namespace CLAM 00016 { 00017 class AudioInPort; 00018 class AudioOutPort; 00019 00020 class LadspaWrapper : public Processing 00021 { 00022 private: 00023 typedef void * SOPointer; 00024 LADSPA_Handle _instance; 00025 const LADSPA_Descriptor * _descriptor; 00026 SOPointer _sharedObject; 00027 std::string _libraryFileName; 00028 00029 std::vector< AudioInPort* > _inputPorts; 00030 std::vector< AudioOutPort* > _outputPorts; 00031 00032 std::vector< FloatInControl* > _inputControls; 00033 std::vector< FloatOutControl* > _outputControls; 00034 std::vector< LADSPA_Data > _outputControlValues; 00035 unsigned _bufferSize; 00036 std::string _factoryKey; 00037 void RemovePortsAndControls(); 00038 void ConfigurePortsAndControls(); 00039 void ConfigureControlsPointers(); 00040 void DoUpdatePortsPointers(); 00041 00042 public: 00043 LadspaWrapper( const Config & c = Config()); 00044 LadspaWrapper( const std::string& libraryFileName, unsigned index, const std::string& factoryKey ); 00045 bool ConcreteStart(); 00046 bool ConcreteStop(); 00047 bool ConcreteConfigure(const ProcessingConfig&); 00048 00049 bool Do(); 00050 virtual ~LadspaWrapper(); 00051 00052 const char * GetClassName() const; 00053 00054 bool LoadLibraryFunction(const std::string& libraryFileName, unsigned index, const std::string& factoryKey); 00055 00056 }; 00057 00058 } //namespace CLAM 00059 00060 #endif 00061 00062 00063
1.7.6.1