Developer World
Spresense SDK Library v3.2.0-ebc0364
WavContainerFormatParser Class Reference

#include <wav_containerformat_parser.h>

Public Member Functions

handel_wav_parser parseChunk (const char *file_path, fmt_chunk_t *fmt)
 Parse WAV container. More...
 
bool getChunkList (handel_wav_parser handle, chunk_list_t *list)
 Get Chunk List. More...
 
bool getChunk (handel_wav_parser handle, uint32_t chunk_id, int8_t *buffer)
 Get Chunk. More...
 
int32_t getDataChunk (handel_wav_parser handle, uint16_t format, int8_t *buffer, uint32_t size)
 Get Data Chunk. More...
 
void resetParser (handel_wav_parser handle)
 Reset Parser. More...
 

Detailed Description

Class definition of the parser

Member Function Documentation

◆ parseChunk()

handel_wav_parser parseChunk ( const char *  file_path,
fmt_chunk_t fmt 
)

Parse WAV container.

Parse WAV container and return handle, and "fmt" chunk.
The "fmt" chunk include sampling rate, bit length, ch num... and more.

Parameters
[in]file_pathPath of Target WAV format file
[out]fmtInformation of FMT chunk
Return values
handleof the parser

◆ getChunkList()

bool getChunkList ( handel_wav_parser  handle,
chunk_list_t list 
)

Get Chunk List.

Get list of chunks which is included in designated WAV file.

Parameters
[in]handleHandle of the parser
[out]list: list of chunks in WAV format file
Return values
result

◆ getChunk()

bool getChunk ( handel_wav_parser  handle,
uint32_t  chunk_id,
int8_t *  buffer 
)

Get Chunk.

Get chunk by chunk id.

Parameters
[in]handleHandle of the parser
[in]chunk_idID of require chunk
[in]bufferMemory address which will store chunk data
Return values
result

◆ getDataChunk()

int32_t getDataChunk ( handel_wav_parser  handle,
uint16_t  format,
int8_t *  buffer,
uint32_t  size 
)

Get Data Chunk.

Get Data chunk.

Parameters
[in]handleHandle of the parser
[in]formatWAV format(currently, support only WAVE_FORMAT_PCM)
[in]bufferMemory address which will store data chunk data
[in]sizeSize of buffer
Return values
gotsize

◆ resetParser()

void resetParser ( handel_wav_parser  handle)

Reset Parser.

Close WAV file and free internal memory area.

Parameters
[in]handleHandle of parser

The documentation for this class was generated from the following file: