hi_audio_frame
Function
Defines the audio frame.
Definition
typedef struct {
hi_audio_bit_width bit_width;
hi_audio_snd_mode snd_mode;
hi_u8 ATTRIBUTE *virt_addr[HI_AUDIO_FRAME_CHN_NUM];
hi_u64 ATTRIBUTE phys_addr[HI_AUDIO_FRAME_CHN_NUM];
hi_u64 time_stamp;
hi_u32 seq;
hi_u32 len;
hi_u32 pool_id[HI_AUDIO_FRAME_CHN_NUM];
} hi_audio_frame;
For details about basic data types hi_u8, hi_u64, and hi_u32, see Basic Data Types.
Members
Member |
Description |
|---|---|
bit_width |
Audio sampling precision (bit width). For details, see hi_audio_bit_width. |
snd_mode |
Audio channel mode. For details, see hi_audio_snd_mode. |
virt_addr |
Virtual address of the audio frame data. The mono-channel data with the length of len is stored at the virtual address virt_addr [0]. The left-channel data and right-channel data of the stereo data is stored separately. To be specific, the left-channel data with the length of len is stored at the virtual address virt_addr [0], whereas the right-channel data with the length of len is stored at the virtual address virt_addr [1]. |
phys_addr |
Physical address of the audio frame data. |
time_stamp |
Time stamp of the audio frame (unit: μs). |
seq |
Sequence number of the audio frame. |
len |
Length of the audio frame of a single channel (unit: byte). |
pool_id |
ID of an audio frame buffer pool. |