22 #ifndef LadspaProcessingExporter_hxx
23 #define LadspaProcessingExporter_hxx
39 std::vector<LADSPA_Data *> _portBuffers;
40 LADSPA_Data ** _outportBuffers;
41 LADSPA_Data ** _inportBuffers;
42 LADSPA_Data ** _incontrolBuffers;
43 LADSPA_Data ** _outcontrolBuffers;
44 std::vector<AudioOutPort*> mWrappersList;
47 unsigned _nInControls;
48 unsigned _nOutControls;
57 SetProcessing(processing);
66 _portBuffers.resize(NPorts());
68 _incontrolBuffers = &(_portBuffers[0]);
69 _outcontrolBuffers = _incontrolBuffers + _nInControls;
70 _inportBuffers = _outcontrolBuffers + _nOutControls;
71 _outportBuffers = _inportBuffers + _nInPorts;
73 mWrappersList.resize(_nInPorts);
74 for (
unsigned i=0; i<mWrappersList.size(); i++)
77 mWrappersList[i]->ConnectToIn( _proc->
GetInPort(i) );
87 _portBuffers[port] = data;
89 void Run(
unsigned long sampleCount)
92 SetPortSizes(sampleCount);
103 for (
unsigned i=0; i<mWrappersList.size(); i++)
104 delete mWrappersList[i];
109 void DoProc(
unsigned long nSamples);
111 void SetPortSizes(
int size);
117 const std::string & maker,
const std::string & copyright);
119 void SetPortsAndControls(LADSPA_Descriptor *& descriptor);
125 if (_proc)
delete _proc;
133 const char * GetInControlName(
int id)
const;
134 const char * GetOutControlName(
int id)
const;
135 const char * GetInPortName(
int id)
const;
136 const char * GetOutPortName(
int id)
const;
138 unsigned NPorts()
const
140 return _nInPorts + _nOutPorts + _nInControls + _nOutControls;
146 template <
typename ProcessingType>
151 const std::string & maker,
const std::string & copyright)
154 LADSPA_Descriptor * descriptor = adapter.
CreateDescriptor(
id,maker,copyright);
162 #endif//LadspaProcessingExporter_hxx