1 /* SpiralSound 2 * Copyleft (C) 2001 David Griffiths <dave@pawfal.org> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 */ 18 19 #ifndef DiskWriterPLUGIN 20 #define DiskWriterPLUGIN 21 22 #include "../SpiralPlugin.h" 23 #include "../../RiffWav.h" 24 #include <FL/Fl_Pixmap.H> 25 26 class DiskWriterPlugin : public SpiralPlugin 27 { 28 public: 29 DiskWriterPlugin(); 30 virtual ~DiskWriterPlugin(); 31 32 virtual PluginInfo& Initialise(const HostInfo *Host); 33 virtual SpiralGUIType* CreateGUI(); 34 virtual void Execute(); 35 virtual void ExecuteCommands(); 36 37 virtual void StreamOut(std::ostream &s); 38 virtual void StreamIn(std::istream &s); 39 GetBitsPerSample()40 int GetBitsPerSample() { return m_GUIArgs.BitsPerSample; } GetStereo()41 bool GetStereo() { return m_GUIArgs.Stereo; } 42 43 enum GUICommands {NONE,OPENWAV,CLOSEWAV,RECORD,STOP}; 44 struct GUIArgs 45 { 46 char Name[256]; 47 int BitsPerSample; 48 bool Stereo; 49 bool Recording; 50 float TimeRecorded; 51 }; 52 53 private: 54 GUIArgs m_GUIArgs; 55 int m_Version; 56 WavFile m_Wav; 57 }; 58 59 #endif 60