This is the public API for the WAV decoder. This decoder only supports WAV PCM format.
Data Structures | |
struct | wav_info_t |
This structure contains information about the WAV file format. More... | |
Macros | |
#define | OUTPUT_BUFFER_SIZE 0x400 |
Functions | |
bool | wav_decode (struct wav_info_t *wav_info) |
Decode a buffer of OUTPUT_BUFFER_SIZE bytes from the WAV file. More... | |
bool | wav_decode_end (struct wav_info_t *wav_info) |
End the decoding, clean remaining buffers. More... | |
bool | wav_file_get_data (struct wav_info_t *wav_info) |
Callback which needs to be implement on the user side to acquire the WAV file data. More... | |
uint32_t | wav_get_duration_s (struct wav_info_t *wav_info) |
Get the duration of a WAV file in seconds. More... | |
bool | wav_header_decode (struct wav_info_t *wav_info) |
Decode the header of a WAV file. This function will fill the wav_info_t structure passed in argument to this function. More... | |
#define OUTPUT_BUFFER_SIZE 0x400 |
Size in byte of the output buffer size
Referenced by pcm_decode(), and play_wav().
bool wav_decode | ( | struct wav_info_t * | wav_info | ) |
Decode a buffer of OUTPUT_BUFFER_SIZE bytes from the WAV file.
wav_info | the wav_info_t structure describing the file of interest. |
References p_decode_fct.
Referenced by play_wav().
bool wav_decode_end | ( | struct wav_info_t * | wav_info | ) |
End the decoding, clean remaining buffers.
wav_info | the wav_info_t structure describing the file of interest. |
Referenced by play_wav().
bool wav_file_get_data | ( | struct wav_info_t * | wav_info | ) |
Callback which needs to be implement on the user side to acquire the WAV file data.
wav_info | the wav_info_t structure describing the file of interest. |
Callback which needs to be implement on the user side to acquire the WAV file data.
References wav_info_t::buffer, wav_info_t::buffer_current_pos, file_eof(), file_read_buf(), file_seek(), FS_NAV_ID_AUDIO, FS_SEEK_CUR_RE, wav_info_t::in_buffer_left, IN_BUFFER_SIZE, nav_checkdisk_disable(), nav_checkdisk_enable(), and nav_select().
Referenced by get_wav_byte(), and get_wav_data().
uint32_t wav_get_duration_s | ( | struct wav_info_t * | wav_info | ) |
Get the duration of a WAV file in seconds.
wav_info | the wav_info_t structure describing the file of interest. |
References wav_info_t::bits_per_sample, wav_info_t::dataleft, wav_info_t::nChannels, and wav_info_t::sampling_rate.
Referenced by play_wav().
bool wav_header_decode | ( | struct wav_info_t * | wav_info | ) |
Decode the header of a WAV file.
This function will fill the wav_info_t structure passed in argument to this function.
wav_info | WAV format information. This structure will be updated with the call of this function. |
References wav_info_t::bits_per_sample, wav_info_t::block_align, conv16little2big(), conv32little2big(), wav_info_t::dataleft, get_wav_data(), wav_info_t::nChannels, p_decode_fct, PCM_COMP_CODE, pcm_decode(), wav_info_t::sampling_rate, TAG_DATA, TAG_FMT, TAG_RIFF, and TAG_WAVE.
Referenced by play_wav().