![]() |
Mixxx
|
00001 /*************************************************************************** 00002 * * 00003 * This program is free software; you can redistribute it and/or modify * 00004 * it under the terms of the GNU General Public License as published by * 00005 * the Free Software Foundation; either version 2 of the License, or * 00006 * (at your option) any later version. * 00007 * * 00008 ***************************************************************************/ 00009 00010 #ifndef ENGINELADSPA_H 00011 #define ENGINELADSPA_H 00012 00013 #include "engineobject.h" 00014 00015 #include "ladspa/ladspainstance.h" 00016 #include "ladspa/ladspaplugin.h" 00017 00018 class ControlPotmeter; 00019 class LADSPAControl; 00020 class EngineLADSPA; 00021 00022 struct EngineLADSPAControlConnection 00023 { 00024 ControlObject * potmeter; 00025 LADSPAControl * control; 00026 bool remove; 00027 }; 00028 00029 typedef QLinkedList<EngineLADSPAControlConnection *> EngineLADSPAControlConnectionLinkedList; 00030 typedef QVector<EngineLADSPAControlConnection *> EngineLADSPAControlConnectionVector; 00031 00032 class EngineLADSPA : public EngineObject 00033 { 00034 public: 00035 EngineLADSPA(); 00036 ~EngineLADSPA(); 00037 00038 void process(const CSAMPLE *pIn, const CSAMPLE *pOut, const int iBufferSize); 00039 void addInstance(LADSPAInstance * instance); 00040 EngineLADSPAControlConnection * addControl(ControlObject * potmeter, LADSPAControl * control); 00041 00042 static EngineLADSPA * getEngine(); 00043 00044 private: 00045 LADSPAInstanceLinkedList m_Instances; 00046 EngineLADSPAControlConnectionLinkedList m_Connections; 00047 int m_bufferSize; 00048 int m_monoBufferSize; 00049 CSAMPLE * m_pBufferLeft[2]; 00050 CSAMPLE * m_pBufferRight[2]; 00051 00052 static EngineLADSPA * m_pEngine; 00053 }; 00054 00055 #endif