1
/********************************************/
3
Audio Data Input Base Class
4
by Gary P. Scavone, 1999-2000
6
This class can handle multi-channel
7
input. Multi-channel input is
8
interleaved in the vector "data".
9
Actual data input occurs in the
12
Currently, STK is only supporting a few data
13
types (16-bit integer .snd, .wav, .raw, and
14
.aif files and 64-bit double MAT-files). In
15
order to support more formats AND to make the
16
writing of subclasses easier, a format ENUM
17
could be defined and a generalized getData()
18
function written within this WvIn class. Then,
19
most subclasses of WvIn would only have to
20
setup the appropriate parameters and all
21
other processing would happen here.
23
/********************************************/
25
#if !defined(__WvIn_h)
28
/* "Oneshot" files larger than MAX_FILE_LOAD_SIZE will be
29
copied into memory in RT_BUFFER_SIZE chunks, rather than
30
completely loaded into a buffer at instantiation.
32
#define MAX_FILE_LOAD_SIZE 5000000
34
// Buffer size, in sample frames, when incrementally loading from disk
35
#define LOAD_BUFFER_SIZE 1024
40
class WvIn : public Object
58
virtual void getData(long index);
64
void normalize(MY_FLOAT newPeak);
65
virtual void setRate(MY_FLOAT aRate);
66
void setFreq(MY_FLOAT aFreq);
67
virtual void addTime(MY_FLOAT aTime);
68
void addPhase(MY_FLOAT anAngle);
69
void addPhaseOffset(MY_FLOAT anAngle);
70
void setInterpolate(int anInterpStatus);
71
virtual void setLooping(int aLoopStatus);
74
virtual int informTick();
81
#endif // defined(__WvIn_h)