MT2523 API Reference  LinkIt SDK v4

The MP3 codec is used for MP3 playback. More...

Overview

The MP3 codec is used for MP3 playback.

How to use this module

Functions

mp3_codec_function_return_state_t mp3_codec_get_memory_size (uint32_t *memory_size)
 This function gets the memory requirement of MP3 decoder. More...
 
mp3_codec_function_return_state_t mp3_codec_set_memory (uint8_t *memory)
 This function sets the memory for MP3 decoder. More...
 
mp3_codec_function_return_state_t mp3_codec_set_memory2 (void)
 This function sets the memory for MP3 decoder. More...
 
mp3_codec_media_handle_tmp3_codec_open (mp3_codec_callback_t callback)
 This function opens the MP3 codec. More...
 
mp3_codec_function_return_state_t mp3_codec_close (mp3_codec_media_handle_t *handle)
 This function closes the MP3 codec. More...
 
mp3_codec_function_return_state_t mp3_codec_aws_set_flag (mp3_codec_media_handle_t *handle, bool flag)
 This function sets the advanced wireless stereo flag. More...
 
mp3_codec_function_return_state_t mp3_codec_aws_set_initial_sync (mp3_codec_media_handle_t *handle)
 This function sets the advanced wireless stereo initial synchronization. More...
 

Modules

 Enum
 
 Struct
 
 Typedef
 

Function Documentation

mp3_codec_function_return_state_t mp3_codec_aws_set_flag ( mp3_codec_media_handle_t handle,
bool  flag 
)

This function sets the advanced wireless stereo flag.

Parameters
[in]handleis the mp3 codec handle.
[in]flagis used to determine to turn on or turn off AWS mechanism. 1: turn on AWS, 0: turn off AWS.
Returns
If the operation completed successfully, the return value is MP3_CODEC_RETURN_OK, otherwise the return value is MP3_CODEC_RETURN_ERROR.
mp3_codec_function_return_state_t mp3_codec_aws_set_initial_sync ( mp3_codec_media_handle_t handle)

This function sets the advanced wireless stereo initial synchronization.

Parameters
[in]handleis the mp3 codec handle.
Returns
If the operation completed successfully, the return value is MP3_CODEC_RETURN_OK, otherwise the return value is MP3_CODEC_RETURN_ERROR.

This function closes the MP3 codec.

Parameters
[in]handleis the MP3 codec handle.
Returns
Return state from MP3 codec. Please refer to mp3_codec_function_return_state_t.
See also
mp3_codec_open()
mp3_codec_function_return_state_t mp3_codec_get_memory_size ( uint32_t *  memory_size)

This function gets the memory requirement of MP3 decoder.

Parameters
[in]memory_sizeis a pointer to get the memory requirment of MP3 decoder.
Returns
Return status of this API call. Please refer to mp3_codec_function_return_state_t.
See also
mp3_codec_set_memory()
mp3_codec_media_handle_t* mp3_codec_open ( mp3_codec_callback_t  callback)

This function opens the MP3 codec.

Parameters
[in]callbackis a pointer to the callback function for the MP3 data control.
Returns
Media handle of the MP3 codec. Please refer to #mp3_media_handle_t.
See also
mp3_codec_close()
mp3_codec_function_return_state_t mp3_codec_set_memory ( uint8_t *  memory)

This function sets the memory for MP3 decoder.

Parameters
[in]memoryis a pointer to set the memory for MP3 decoder. The memory size should be the same size as mp3_codec_get_memory_size().
Returns
Return status of this API call. Please refer to mp3_codec_function_return_state_t.
See also
mp3_codec_get_memory_size()
mp3_codec_function_return_state_t mp3_codec_set_memory2 ( void  )

This function sets the memory for MP3 decoder.

Returns
Return status of this API call. Please refer to mp3_codec_function_return_state_t.