mirror of
https://github.com/openharmony/drivers_peripheral.git
synced 2026-08-24 18:15:56 -04:00
9d7af7721d
新增用例提高用例覆盖率 Created-by: wanghongen Commit-by: w60091471 Merged-by: openharmony_ci Description: ### 相关的Issue [#6605](https://gitcode.com/openharmony/drivers_peripheral/issues/6605) ### 原因(目的、解决的问题等) ### 描述(做了什么,变更了什么) ### 测试用例(新增、改动、可能影响的功能) Co-authored-by:Agent See merge request: openharmony/drivers_peripheral!8664
audio
Introduction
This repository contains a set of HDIs that can be used to:
- Manage loading and unloading of sound card drivers.
- Create audio renderer and capturer.
- Select an audio scene.
- Set audio properties.
- Set the audio volume and gain.
- Start or stop audio playback and recording.
Figure 1 Logic view of modules related to this repository

Directory Structure
The source code directory structure in this repository is as follows:
drivers/peripheral/audio/
└── interfaces # External interfaces provided by the audio driver module
└── include # HDIs provided by the audio driver module for application development
Available APIs
The audio driver module provides functions that can be directly called by the audio service. The APIs are used to load or unload an audio adapter, create audio renderer and capturer, start or stop audio playback and recording, and adjust the audio volume.
Table 1 describes major HDIs provided by the audio driver module.
Table 1 Audio HDIs
Usage Guidelines
The core functionalities of this repository are as follows:
- Provides audio HDIs for audio services to implement basic audio features on applications.
- Provides standard interfaces for device developers to ensure that the OEM vendor can comply with the HDI adapter standard. This promises a healthy evolution of the ecosystem.
For details about the invocation and implementation, see the API reference.