hi_mpi_ai_release_frame
The
The
Description
Releases the buffer for storing audio frames.
Restrictions
- When the audio-left channel or stereo channel is used for recording, ai_chn must be fixed at 0. When the audio-right channel is used for recording, ai_chn is 1.
- This API and hi_mpi_ai_get_frame must be used in pairs. Call hi_mpi_ai_get_frame to obtain audio frames. After audio frames are used, call this API to release the buffer for storing audio frames in time.
- This API cannot be called repeatedly.
Prototype
hi_s32 hi_mpi_ai_release_frame(hi_audio_dev ai_dev, hi_ai_chn ai_chn, const hi_audio_frame *frame, const hi_aec_frame *aec_frame);
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
ai_dev |
Input |
Audio device ID. The value range is [0, 2]. |
ai_chn |
Input |
AI channel ID. |
frame |
Input |
Pointer to the structure of the audio frame. This parameter is reserved. Currently, it is set to NULL. |
aec_frame |
Input |
This parameter is set to NULL. |
Returns
- 0: success
- Other values: failure. For details, see Audio Return Codes.
Parent topic: AI/AO