5 #ifndef SAMPLESTREAM_H_
6 #define SAMPLESTREAM_H_
8 #include <SampleData.h>
11 #include <libraries/sndfile/sndfile.h>
20 SampleStream(
const char* filename,
int numChannels,
int bufferLength);
22 int openFile(
const char* filename,
int numChannels,
int bufferLength);
25 float getSample(
int channel);
26 int bufferNeedsFilled();
27 void togglePlayback();
28 void togglePlaybackWithFade(
float fadeLengthInSeconds);
29 void togglePlayback(
int toggle);
30 void togglePlaybackWithFade(
int toggle,
float fadeLengthInSeconds);
36 int getSamples(
const char* file,
float *buf,
int channel,
int startFrame,
int endFrame);
37 int getNumChannels(
const char* file);
38 int getNumFrames(
const char* file);
51 int gDoneLoadingBuffer;
56 const char* gFilename;
57 int gBufferToBeFilled;
61 float gFadeLengthInSeconds;
66 SNDFILE *sndfile = NULL;
71 #endif // SAMPLESTREAM_H_
Definition: SampleStream.h:15
Definition: SampleData.h:12