hi_mpi_ai_release_frame

Applicability

Product

Supported

Atlas A3 training products / Atlas A3 inference products

Atlas A2 training products / Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Description

Releases the buffer for storing audio frames.

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

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.

See Also

For the API call sequence, see Audio Obtaining and Playing.