Home Information Classes Download Usage Mail List Requirements Links FAQ Tutorial
00001 /***************************************************/ 00022 /***************************************************/ 00023 00024 #ifndef STK_FILEWVOUT_H 00025 #define STK_FILEWVOUT_H 00026 00027 #include "WvOut.h" 00028 #include "FileWrite.h" 00029 00030 class FileWvOut : public WvOut 00031 { 00032 public: 00033 00035 00039 FileWvOut( unsigned int bufferFrames = 1024 ); 00040 00042 00045 FileWvOut( std::string fileName, 00046 unsigned int nChannels = 1, 00047 FileWrite::FILE_TYPE type = FileWrite::FILE_WAV, 00048 Stk::StkFormat format = STK_SINT16, 00049 unsigned int bufferFrames = 1024 ); 00050 00052 virtual ~FileWvOut(); 00053 00055 00060 void openFile( std::string fileName, 00061 unsigned int nChannels, 00062 FileWrite::FILE_TYPE type, 00063 Stk::StkFormat format ); 00064 00066 00070 void closeFile( void ); 00071 00072 protected: 00073 00074 void computeSample( const StkFloat sample ); 00075 00076 void computeFrames( const StkFrames& frames ); 00077 00078 void incrementFrame( void ); 00079 00080 FileWrite file_; 00081 unsigned int bufferFrames_; 00082 unsigned int bufferIndex_; 00083 unsigned int iData_; 00084 00085 }; 00086 00087 #endif
The Synthesis ToolKit in C++ (STK) |
©1995-2007 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |