1 #ifndef STK_FILEWRITE_H
2 #define STK_FILEWRITE_H
35 typedef unsigned long FILE_TYPE;
50 FileWrite( std::string fileName,
unsigned int nChannels = 1, FILE_TYPE type = FILE_WAV, Stk::StkFormat format =
STK_SINT16 );
59 void open( std::string fileName,
unsigned int nChannels = 1,
60 FileWrite::FILE_TYPE type = FILE_WAV, Stk::StkFormat format =
STK_SINT16 );
79 bool setRawFile( std::string fileName );
82 bool setWavFile( std::string fileName );
85 void closeWavFile(
void );
88 bool setSndFile( std::string fileName );
91 void closeSndFile(
void );
94 bool setAifFile( std::string fileName );
97 void closeAifFile(
void );
100 bool setMatFile( std::string fileName );
103 void closeMatFile(
void );
108 unsigned int channels_;
109 unsigned long frameCounter_;
STK audio file output class.
Definition: FileWrite.h:31
static const FILE_TYPE FILE_MAT
Definition: FileWrite.h:41
virtual ~FileWrite()
Class destructor.
Definition: FileWrite.cpp:114
The STK namespace.
Definition: FileRead.cpp:41
static const FILE_TYPE FILE_RAW
Definition: FileWrite.h:37
void open(std::string fileName, unsigned int nChannels=1, FileWrite::FILE_TYPE type=FILE_WAV, Stk::StkFormat format=STK_SINT16)
Create a file of the specified type and name and output samples to it in the given data format...
Definition: FileWrite.cpp:143
bool isOpen(void)
Returns true if a file is currently open.
Definition: FileWrite.cpp:137
void close(void)
If a file is open, write out samples in the queue and then close it.
Definition: FileWrite.cpp:119
An STK class to handle vectorized audio data.
Definition: Stk.h:272
STK base class.
Definition: Stk.h:132
void write(StkFrames &buffer)
Write sample frames from the StkFrames object to the file.
Definition: FileWrite.cpp:712
FileWrite(void)
Default constructor.
Definition: FileWrite.cpp:103
static const StkFormat STK_SINT16
Definition: Stk.h:138
static const FILE_TYPE FILE_AIF
Definition: FileWrite.h:40
static const FILE_TYPE FILE_WAV
Definition: FileWrite.h:38
static const FILE_TYPE FILE_SND
Definition: FileWrite.h:39