Class daisy::WaveTableLoader¶
ClassList > daisy > WaveTableLoader
#include <WaveTableLoader.h>
Public Types¶
Type | Name |
---|---|
enum | Result |
Public Functions¶
Type | Name |
---|---|
float * | GetTable (size_t idx) |
Result | Import (const char * filename) |
void | Init (float * mem, size_t mem_size) |
Result | SetWaveTableInfo (size_t samps, size_t count) |
WaveTableLoader () |
|
~WaveTableLoader () |
Detailed Description¶
Loads a bank of wavetables into memory. Pointers to the start of each waveform will be provided, but the user can do whatever they want with the data once it's imported.
A internal 4kB workspace is used for reading from the file, and conveting to the correct memory location.
Public Types Documentation¶
enum Result¶
Public Functions Documentation¶
function GetTable¶
Returns pointer to specific table start or nullptr if invalid idx
function Import¶
Opens and loads the file The data will be converted from its original type to float And the wavheader data will be stored internally to the class, but will not be stored in the user-provided buffer.
Currently only 16-bit and 32-bit data is supported. The importer also assumes data is mono so stereo data will be loaded as-is (i.e. interleaved)
function Init¶
Initializes the Loader
function SetWaveTableInfo¶
Sets the size of the tables to allow access to the specific waveforms
function WaveTableLoader¶
function ~WaveTableLoader¶
The documentation for this class was generated from the following file external-docs/libDaisy/src/util/WaveTableLoader.h