wavplayer library
v0.90
Plays 16-bit, 32 ksps, mono wav files
|
Plays 16-bit, 32ksps, mono .wav files in the root directory of a microSD card. More...
Functions | |
void | play (void) |
void | wav_reader (void *par) |
void | audio_dac (void *par) |
void | spooler (void *par) |
void | wav_play (const char *wavFilename) |
Play a .wav file. | |
int | wav_playing () |
Check if wav file is currently playing. | |
void | wav_volume (int vol) |
Set wav play volume 0 to 10. 0 is lowest, 10 is highest. | |
void | wav_stop (void) |
Stop wav file reading but leave audio output open so that you can play another track without a click at the start. Recommended over wav_close unless your application needs to recover both the wav reading and audio output cogs for other uses. | |
void | wav_close (void) |
Stop wav file reading and close audio output. Only recommended if your application needs to recover two cogs for other purposes. Otherwise, use wave_stop. It will stop the cog that reads the wav file, but leave the audio output cog open, which will prevent a click at the start of the next track your application plays. |
Variables | |
char | wavDacBufferL [512] |
char | wavDacBufferH [512] |
volatile const char * | track |
FILE * | fp |
Plays 16-bit, 32ksps, mono .wav files in the root directory of a microSD card.
Currently supports LMM and CMM memory models.
WAV file info sources, thanks to:
http://blogs.msdn.com/b/dawate/archive/2009/06/23/intro-to-audio-programming-part-2-demystifying-the-wav-format.aspx
http://www.sonicspot.com/guide/wavefiles.html
void wav_play | ( | const char * | wavFilename | ) |
Play a .wav file.
wavFilename | Pointer to character array with filename. |
int wav_playing | ( | ) |
Check if wav file is currently playing.
void wav_volume | ( | int | vol | ) |
Set wav play volume 0 to 10. 0 is lowest, 10 is highest.
vol | wav playback volume. |