1 #ifndef STK_FILEWRITE_H
2 #define STK_FILEWRITE_H
35 typedef unsigned long FILE_TYPE;
59 void open( std::string fileName,
unsigned int nChannels = 1,
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:32
static const FILE_TYPE FILE_SND
Definition: FileWrite.h:39
FileWrite(std::string fileName, unsigned int nChannels=1, FILE_TYPE type=FILE_WAV, Stk::StkFormat format=STK_SINT16)
Overloaded constructor used to specify a file name, type, and data format with this object.
bool isOpen(void)
Returns true if a file is currently open.
static const FILE_TYPE FILE_AIF
Definition: FileWrite.h:40
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.
static const FILE_TYPE FILE_WAV
Definition: FileWrite.h:38
void close(void)
If a file is open, write out samples in the queue and then close it.
FileWrite(void)
Default constructor.
virtual ~FileWrite()
Class destructor.
static const FILE_TYPE FILE_RAW
Definition: FileWrite.h:37
static const FILE_TYPE FILE_MAT
Definition: FileWrite.h:41
void write(StkFrames &buffer)
Write sample frames from the StkFrames object to the file.
An STK class to handle vectorized audio data.
Definition: Stk.h:287
STK base class.
Definition: Stk.h:144
static const StkFormat STK_SINT16
Definition: Stk.h:149
The STK namespace.
Definition: ADSR.h:8