SynthLab SDK
|
Opens a WAV file and extracts contents into a floating point buffer, regardless of original datatypes in file. After parsing the file, use const float* getSampleBuffer() to acces the read-only buffer of data. The following types are supported: More...
#include <pcmsample.h>
Public Member Functions | |
bool | loadPCMSample (const char *filePath) |
Opens a WAV file and extracts the audio guts into a buffer of floats. Anytime later, you can use isSampleLoaded( ) to see if the sample data is valid. More... | |
const float * | getSampleBuffer () |
void | setPitchless (bool _pitchlessSample) |
bool | isPitchless () |
bool | isSampleLoaded () |
uint32_t | getNumChannels () |
Immutable variables can only be set during file parse. | |
uint32_t | getSampleRate () |
Immutable variables can only be set during file parse. | |
uint32_t | getSampleCount () |
Immutable variables can only be set during file parse. | |
uint32_t | getLoopType () |
Immutable variables can only be set during file parse. | |
uint32_t | getSmpteFormat () |
Immutable variables can only be set during file parse. | |
uint32_t | getSmpteOffset () |
Immutable variables can only be set during file parse. | |
uint32_t | getLoopCount () |
Mutable variables that may need to be re-calculated after parsing. | |
void | setLoopCount (uint32_t u) |
Mutable variables that may need to be re-calculated after parsing. | |
uint32_t | getLoopStartIndex () |
Mutable variables that may need to be re-calculated after parsing. | |
void | setLoopStartIndex (uint32_t u) |
Mutable variables that may need to be re-calculated after parsing. | |
uint32_t | getLoopEndIndex () |
Mutable variables that may need to be re-calculated after parsing. | |
void | setLoopEndIndex (uint32_t u) |
Mutable variables that may need to be re-calculated after parsing. | |
uint32_t | getUnityMIDINote () |
Mutable variables that may need to be re-calculated after parsing. | |
void | setUnityMIDINote (uint32_t u) |
Mutable variables that may need to be re-calculated after parsing. | |
uint32_t | getUnityMIDIPitchFraction () |
Mutable variables that may need to be re-calculated after parsing. | |
void | setUnityMIDIPitchFraction (uint32_t u) |
Mutable variables that may need to be re-calculated after parsing. | |
Opens a WAV file and extracts contents into a floating point buffer, regardless of original datatypes in file. After parsing the file, use const float* getSampleBuffer() to acces the read-only buffer of data. The following types are supported:
|
inline |
only set true if WAV parse was sucessful
bool SynthLab::PCMSample::loadPCMSample | ( | const char * | pFilePath | ) |
Opens a WAV file and extracts the audio guts into a buffer of floats. Anytime later, you can use isSampleLoaded( ) to see if the sample data is valid.
PCM sample load and buffer access
pFilePath | fully qualified WAV file path |
|
inline |
pitchless samples (read inc = 1 always)