CLAM-Development
1.1
|
00001 /* 00002 * Copyright (c) 2004 MUSIC TECHNOLOGY GROUP (MTG) 00003 * UNIVERSITAT POMPEU FABRA 00004 * 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 * 00020 */ 00021 00022 #ifndef _AutoPanner_hxx_ 00023 #define _AutoPanner_hxx_ 00024 00025 #include "DataTypes.hxx" 00026 #include "OutControl.hxx" 00027 #include "Processing.hxx" 00028 #include "ProcessingConfig.hxx" 00029 #include <string> 00030 00031 namespace CLAM 00032 { 00033 00034 class AutoPannerConfig : public ProcessingConfig 00035 { 00036 public: 00037 DYNAMIC_TYPE_USING_INTERFACE (AutoPannerConfig, 4, ProcessingConfig); 00038 DYN_ATTRIBUTE (0, public, TData, Frequency); 00039 DYN_ATTRIBUTE (1, public, TData , SamplingRate); 00040 DYN_ATTRIBUTE (2, public, TData , Phase); 00041 DYN_ATTRIBUTE (3, public, int , FrameSize); 00042 protected: 00043 void DefaultInit(void); 00044 }; 00045 00046 class AutoPanner : public Processing 00047 { 00048 private: 00049 00050 TData mFreq; 00051 TData mSamplingRate; 00052 TData mPhase; 00053 TData mDeltaPhase; 00054 int mFrameSize; 00055 00056 AutoPannerConfig mConfig; 00057 OutControl mLeft; 00058 OutControl mRight; 00059 00060 public: 00061 AutoPanner(); 00062 AutoPanner( const AutoPannerConfig & ); 00063 00064 bool Do(); 00065 virtual ~AutoPanner(){} 00066 const char * GetClassName() const {return "AutoPanner";} 00067 00068 inline const ProcessingConfig &GetConfig() const { return mConfig;} 00069 bool ConcreteConfigure(const ProcessingConfig& c); 00070 00071 }; 00072 00073 } //namespace CLAM 00074 00075 #endif 00076