daisy::WavPlayer¶
#include <wavplayer.h>
Public Functions¶
Name | |
---|---|
WavPlayer() | |
~WavPlayer() | |
void | Init(const char * search_path) |
int | Open(size_t sel) |
int | Close() |
int16_t | Stream() |
void | Prepare() |
void | Restart() |
void | SetLooping(bool loop) |
bool | GetLooping() const |
size_t | GetNumberFiles() const |
size_t | GetCurrentFile() const |
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 WavPlayer¶
function ~WavPlayer¶
function Init¶
Initializes the WavPlayer, loading up to max_files of wav files from an SD Card.
function Open¶
Parameters:
- sel File to open
Opens the file at index sel for reading.
function Close¶
Return: &
Closes whatever file is currently open.
function Stream¶
Return: The next sample if playing, otherwise returns 0
function Prepare¶
Collects buffer for playback when needed.
function Restart¶
Resets the playback position to the beginning of the file immediately
function SetLooping¶
Parameters:
- loop To loop or not to loop.
Sets whether or not the current file will repeat after completing playback.
function GetLooping¶
Return: Whether the WavPlayer is looping or not.
function GetNumberFiles¶
Return: The number of files loaded by the WavPlayer
function GetCurrentFile¶
Return: currently selected file.
---¶
Updated on 2024-01-03 at 19:41:00 +0000