Home Information Classes Download Usage Mail List Requirements Links FAQ Tutorial

FileWvOut.h
1#ifndef STK_FILEWVOUT_H
2#define STK_FILEWVOUT_H
3
4#include "WvOut.h"
5#include "FileWrite.h"
6
7 namespace stk {
8
9/***************************************************/
30/***************************************************/
31
32 class FileWvOut : public WvOut
33{
34 public:
35
37
41 FileWvOut( unsigned int bufferFrames = 1024 );
42
44
47 FileWvOut( std::string fileName,
48 unsigned int nChannels = 1,
49 FileWrite::FILE_TYPE type = FileWrite::FILE_WAV,
50 Stk::StkFormat format = STK_SINT16,
51 unsigned int bufferFrames = 1024 );
52
54 virtual ~FileWvOut();
55
57
62 void openFile( std::string fileName,
63 unsigned int nChannels,
64 FileWrite::FILE_TYPE type,
65 Stk::StkFormat format );
66
68
72 void closeFile( void );
73
75
78 void tick( const StkFloat sample );
79
81
87 void tick( const StkFrames& frames );
88
89 protected:
90
91 void incrementFrame( void );
92
93 FileWrite file_;
94 unsigned int bufferFrames_;
95 unsigned int bufferIndex_;
96 unsigned int iData_;
97
98};
99
100} // stk namespace
101
102#endif
stk::FileWrite
STK audio file output class.
Definition FileWrite.h:32
stk::FileWrite::FILE_WAV
static const FILE_TYPE FILE_WAV
Definition FileWrite.h:38
stk::FileWvOut::FileWvOut
FileWvOut(std::string fileName, unsigned int nChannels=1, FileWrite::FILE_TYPE type=FileWrite::FILE_WAV, Stk::StkFormat format=STK_SINT16, unsigned int bufferFrames=1024)
Overloaded constructor used to specify a file name, type, and data format with this object.
stk::FileWvOut::openFile
void openFile(std::string fileName, unsigned int nChannels, FileWrite::FILE_TYPE type, Stk::StkFormat format)
Open a new file with the specified parameters.
stk::FileWvOut::tick
void tick(const StkFrames &frames)
Output the StkFrames data.
stk::FileWvOut::closeFile
void closeFile(void)
Close a file if one is open.
stk::FileWvOut::FileWvOut
FileWvOut(unsigned int bufferFrames=1024)
Default constructor with optional output buffer size argument.
stk::FileWvOut::tick
void tick(const StkFloat sample)
Output a single sample to all channels in a sample frame.
stk::FileWvOut::~FileWvOut
virtual ~FileWvOut()
Class destructor.
stk::StkFrames
An STK class to handle vectorized audio data.
Definition Stk.h:279
stk::Stk::STK_SINT16
static const StkFormat STK_SINT16
Definition Stk.h:141
stk::WvOut::WvOut
WvOut(void)
Default constructor.
Definition WvOut.h:27
stk
The STK namespace.
Definition ADSR.h:6

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