1 /* 2 * Copyright (C) 2002 - David W. Durham 3 * 4 * This file is part of ReZound, an audio editing application. 5 * 6 * ReZound is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published 8 * by the Free Software Foundation; either version 2 of the License, 9 * or (at your option) any later version. 10 * 11 * ReZound is distributed in the hope that it will be useful, but 12 * WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 19 */ 20 21 #ifndef __CQuantizeEffect_H__ 22 #define __CQuantizeEffect_H__ 23 24 #include "../../../config/common.h" 25 26 27 #include "../AAction.h" 28 29 class CQuantizeEffect : public AAction 30 { 31 public: 32 CQuantizeEffect(const AActionFactory *factory,const CActionSound *actionSound,unsigned quantumCount,float inputGain,float outputGain); 33 virtual ~CQuantizeEffect(); 34 35 protected: 36 bool doActionSizeSafe(CActionSound *actionSound,bool prepareForUndo); 37 void undoActionSizeSafe(const CActionSound *actionSound); 38 CanUndoResults canUndo(const CActionSound *actionSound) const; 39 40 private: 41 const unsigned quantumCount; 42 const float inputGain,outputGain; 43 }; 44 45 class CQuantizeEffectFactory : public AActionFactory 46 { 47 public: 48 CQuantizeEffectFactory(AActionDialog *channelSelectDialog,AActionDialog *dialog); 49 virtual ~CQuantizeEffectFactory(); 50 51 CQuantizeEffect *manufactureAction(const CActionSound *actionSound,const CActionParameters *actionParameters) const; 52 }; 53 54 #endif 55