This action will force synchronization from OpenHarmony/docs, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
Related Modules:
Description:
Provides attribute-related APIs for audio rendering or capturing, including functions to obtain frame information and set audio sampling attributes.
Since:
1.0
Version:
1.0
GetFrameSize )(AudioHandle handle, uint64_t *size) |
Obtains the audio frame size, that is, the length (in bytes) of a frame. |
GetFrameCount )(AudioHandle handle, uint64_t *count) |
|
SetSampleAttributes )(AudioHandle handle, const struct AudioSampleAttributes *attrs) |
|
GetSampleAttributes )(AudioHandle handle, struct AudioSampleAttributes *attrs) |
|
GetCurrentChannelId )(AudioHandle handle, uint32_t *channelId) |
int32_t(* AudioAttribute::GetCurrentChannelId) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle, uint32_t *channelId)
Description:
Obtains the data channel ID of the audio.
Parameters:
handle | Indicates the audio handle. |
channelId | Indicates the pointer to the data channel ID. |
Returns:
Returns 0 if the data channel ID is obtained; returns a negative value otherwise.
int32_t(* AudioAttribute::GetFrameCount) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle, uint64_t *count)
Description:
Obtains the number of audio frames in the audio buffer.
Parameters:
handle | Indicates the audio handle. |
count | Indicates the pointer to the number of audio frames in the audio buffer. |
Returns:
Returns 0 if the number of audio frames is obtained; returns a negative value otherwise.
int32_t(* AudioAttribute::GetFrameSize) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle, uint64_t *size)
Description:
Obtains the audio frame size, that is, the length (in bytes) of a frame.
Parameters:
handle | Indicates the audio handle. |
size | Indicates the pointer to the audio frame size (in bytes). |
Returns:
Returns 0 if the audio frame size is obtained; returns a negative value otherwise.
int32_t(* AudioAttribute::GetSampleAttributes) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle, struct [AudioSampleAttributes](AudioSampleAttributes.md) *attrs)
Description:
Obtains audio sampling attributes.
Parameters:
handle | Indicates the audio handle. |
attrs | Indicates the pointer to the audio sampling attributes, such as the sampling rate, sampling precision, and channel. |
Returns:
Returns 0 if audio sampling attributes are obtained; returns a negative value otherwise.
See also:
int32_t(* AudioAttribute::SetSampleAttributes) ([AudioHandle](Audio.md#ga18675ddb073465fdeac33a897f675d79) handle, const struct [AudioSampleAttributes](AudioSampleAttributes.md) *attrs)
Description:
Sets audio sampling attributes.
Parameters:
handle | Indicates the audio handle. |
attrs | Indicates the pointer to the audio sampling attributes to set, such as the sampling rate, sampling precision, and channel. |
Returns:
Returns 0 if the setting is successful; returns a negative value otherwise.
See also:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。