Class daisy::WavPlayer¶
#include <wavplayer.h>
Public Functions¶
Type | Name |
---|---|
int | Close () |
size_t | GetCurrentFile () const |
bool | GetLooping () const |
size_t | GetNumberFiles () const |
void | Init (const char * search_path) |
int | Open (size_t sel) |
void | Prepare () |
void | Restart () |
void | SetLooping (bool loop) |
int16_t | Stream () |
WavPlayer () |
|
~WavPlayer () |
Detailed Description¶
Wav Player that will load .wav files from an SD Card, and then provide a method of accessing the samples with double-buffering.
Public Functions Documentation¶
function Close¶
Closes whatever file is currently open.
Returns:
&
function GetCurrentFile¶
Returns:
currently selected file.
function GetLooping¶
Returns:
Whether the WavPlayer is looping or not.
function GetNumberFiles¶
Returns:
The number of files loaded by the WavPlayer
function Init¶
Initializes the WavPlayer, loading up to max_files of wav files from an SD Card.
function Open¶
Opens the file at index sel for reading.
Parameters:
sel
File to open
function Prepare¶
Collects buffer for playback when needed.
function Restart¶
Resets the playback position to the beginning of the file immediately
function SetLooping¶
Sets whether or not the current file will repeat after completing playback.
Parameters:
loop
To loop or not to loop.
function Stream¶
Returns:
The next sample if playing, otherwise returns 0
function WavPlayer¶
function ~WavPlayer¶
The documentation for this class was generated from the following file external-docs/libDaisy/src/hid/wavplayer.h