1 Star 0 Fork 4.9K

taoguan / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
AudioManager.md 8.33 KB
一键复制 编辑 原始数据 按行查看 历史
wenjun 提交于 2020-09-08 10:08 . add OpenHarmony 1.0 baseline

AudioManager

Overview

Related Modules:

Audio

Description:

Manages audio adapters through a specific adapter driver program loaded based on the given audio adapter descriptor.

Since:

1.0

Version:

1.0

Summary

Data Fields

Variable Name

Description

GetAllAdapters )(struct AudioManager *manager, struct AudioAdapterDescriptor **descs, int32_t *size)

int32_t(* 

Obtains the list of all adapters supported by an audio driver.

LoadAdapter )(struct AudioManager *manager, const struct AudioAdapterDescriptor *desc, struct AudioAdapter **adapter)

int32_t(* 

Loads the driver for an audio adapter.

UnloadAdapter )(struct AudioManager *manager, struct AudioAdapter *adapter)

void(* 

Unloads the driver of an audio adapter.

Details

Field Documentation

GetAllAdapters

int32_t(* AudioManager::GetAllAdapters) (struct [AudioManager](AudioManager.md) *manager, struct [AudioAdapterDescriptor](AudioAdapterDescriptor.md) **descs, int32_t *size)

Description:

Obtains the list of all adapters supported by an audio driver.

Parameters:

Name

Description

manager Indicates the pointer to the audio adapter manager to operate.
descs Indicates the double pointer to the audio adapter list.
size Indicates the pointer to the length of the list.

Returns:

Returns 0 if the list is obtained successfully; returns a negative value otherwise.

See also:

LoadAdapter

LoadAdapter

int32_t(* AudioManager::LoadAdapter) (struct [AudioManager](AudioManager.md) *manager, const struct [AudioAdapterDescriptor](AudioAdapterDescriptor.md) *desc, struct [AudioAdapter](AudioAdapter.md) **adapter)

Description:

Loads the driver for an audio adapter.

For example, to load a USB driver, you may need to load a dynamic-link library (*.so) in specific implementation.

Parameters:

Name

Description

manager Indicates the pointer to the audio adapter manager to operate.
desc Indicates the pointer to the descriptor of the audio adapter.
adapter Indicates the double pointer to the audio adapter.

Returns:

Returns 0 if the driver is loaded successfully; returns a negative value otherwise.

See also:

GetAllAdapters

UnloadAdapter

void(* AudioManager::UnloadAdapter) (struct [AudioManager](AudioManager.md) *manager, struct [AudioAdapter](AudioAdapter.md) *adapter)

Description:

Unloads the driver of an audio adapter.

Parameters:

Name

Description

manager Indicates the pointer to the audio adapter manager to operate.
adapter Indicates the pointer to the audio adapter whose driver will be unloaded.

See also:

LoadAdapter

1
https://gitee.com/taoguan/docs.git
git@gitee.com:taoguan/docs.git
taoguan
docs
docs
master

搜索帮助