7 #ifndef PDSP_SAMPLERS_SAMPLEBUFFER_H_INCLUDED 8 #define PDSP_SAMPLERS_SAMPLEBUFFER_H_INCLUDED 10 #include "../pdspCore.h" 12 #include "../../flags.h" 14 #include "ofxAudioFile.h" 66 void init(
int tableLen,
int numTables=1 );
125 #endif // PDSP_SAMPLERS_SAMPLEBUFFER_H_INCLUDED void setMonoChannel(int monoChannelIndex)
some Units automatically select one channel if more than one are loaded. This set this default channe...
Definition: SampleBuffer.cpp:67
void init(int tableLen, int numTables=1)
inits the SampleBuffer with an empty table (all the values set to 0.0f)
Definition: SampleBuffer.cpp:174
float ** buffer
multidimensional buffer, use it like this: buffer[channel][sample]
Definition: SampleBuffer.h:94
double fileSampleRate
sample rate of the loaded channels
Definition: SampleBuffer.h:114
void normalize()
scales all the sample values of all the channels so that the absolute maximum value is 1...
Definition: SampleBuffer.cpp:215
void setVerbose(bool verbose)
activate logging of file loading operations for this SampleBuffer
Definition: SampleBuffer.cpp:63
int length
length of each buffer
Definition: SampleBuffer.h:109
Contains the data loaded from an audio file.
Definition: SampleBuffer.h:28
std::string filePath
path of loaded file, or contains diagnostic strings if a file is not loaded
Definition: SampleBuffer.h:89
bool loaded()
returns true if data has been loaded into the SampleBuffer
Definition: SampleBuffer.cpp:91
Thread-safe value control with smoothing.
Definition: SequencerBridge.h:11
int mono
index of channel to select for mono operation
Definition: SampleBuffer.h:104
void load(std::string filePath)
loads the audio data from a file using libsndfile
Definition: SampleBuffer.cpp:149
int channels
number of channels
Definition: SampleBuffer.h:99
void unLoad()
unload the data from the buffer and free the allocated memory
Definition: SampleBuffer.cpp:76