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 __CLoadedSound_H__ 22 #define __CLoadedSound_H__ 23 24 #include "../../config/common.h" 25 26 #include <string> 27 #include <stack> 28 29 class AAction; 30 class CSound; 31 class CSoundPlayerChannel; 32 class ASoundTranslator; 33 34 class CLoadedSound 35 { 36 public: 37 // translator can be NULL 38 CLoadedSound(const string filename,CSoundPlayerChannel *channel,bool isReadOnly,const ASoundTranslator *translator); 39 CLoadedSound(const CLoadedSound &src); 40 virtual ~CLoadedSound(); 41 42 void clearUndoHistory(); 43 44 const string getFilename() const; 45 void changeFilename(const string newFilename); 46 47 bool isReadOnly() const; 48 49 CSoundPlayerChannel * const channel; 50 CSound * const sound; 51 const ASoundTranslator *translator; // can be NULL, is used to save (in contrast with save-as) the sound after an open 52 53 // this stack is used for undoing actions (later a stack could be used for redoing actions) 54 stack<AAction *> actions; 55 56 private: 57 string filename; 58 bool _isReadOnly; 59 60 }; 61 62 63 64 #endif 65