LadspaWrapperBuffer.hxx

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