Home
Information
Classes
Download
Usage
Mail List
Requirements
Links
FAQ
Tutorial
include
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
The Synthesis ToolKit in C++ (STK)
©1995--2021 Perry R. Cook and Gary P. Scavone. All Rights Reserved.