The Synthesis ToolKit in C++ (STK)

Home Information Classes Download Usage Mail List Requirements Links FAQ Tutorial

# FileWvOut.h

    00001 #ifndef STK_FILEWVOUT_H
    00002 #define STK_FILEWVOUT_H
    00003
    00004 #include "WvOut.h"
    00005 #include "FileWrite.h"
    00006
    00007 namespace stk {
    00008
    00009 /***************************************************/
    00030 /***************************************************/
    00031
    00032 class FileWvOut : public WvOut
    00033 {
    00034  public:
    00035
    00037
    00041   FileWvOut( unsigned int bufferFrames = 1024 );
    00042
    00044
    00047   FileWvOut( std::string fileName,
    00048              unsigned int nChannels = 1,
    00049              FileWrite::FILE_TYPE type = FileWrite::FILE_WAV,
    00050              Stk::StkFormat format = STK_SINT16,
    00051              unsigned int bufferFrames = 1024 );
    00052
    00054   virtual ~FileWvOut();
    00055
    00057
    00062   void openFile( std::string fileName,
    00063                  unsigned int nChannels,
    00064                  FileWrite::FILE_TYPE type,
    00065                  Stk::StkFormat format );
    00066
    00068
    00072   void closeFile( void );
    00073
    00075
    00078   void tick( const StkFloat sample );
    00079
    00081
    00087   void tick( const StkFrames& frames );
    00088
    00089  protected:
    00090
    00091   void incrementFrame( void );
    00092
    00093   FileWrite file_;
    00094   unsigned int bufferFrames_;
    00095   unsigned int bufferIndex_;
    00096   unsigned int iData_;
    00097
    00098 };
    00099
    00100 } // stk namespace
    00101
    00102 #endif

The Synthesis ToolKit in C++ (STK)
©1995-2012 Perry R. Cook and Gary P. Scavone. All Rights Reserved.