1# HdiA2dp 2 3## 概述 4 5HdiA2dp为A2DP服务提供统一接口。 6 7主机可以通过该模块提供的接口创建音频通话,与音频子系统交换数据。 8 9**起始版本:** 4.0 10 11 12## 汇总 13 14 15### 文件 16 17| 名称 | 描述 | 18| -------- | -------- | 19| [BluetoothAudioTypes.idl](_bluetooth_audio_types_8idl.md) | 声明数据结构。 | 20| [IBluetoothAudioCallback.idl](_i_bluetooth_audio_callback_8idl.md) | 声明回调函数,包含音频开始、暂停和结束操作。 | 21| [IBluetoothAudioSession.idl](_i_bluetooth_audio_session_8idl.md) | 声明开启音频会话,发送渲染操作结果,和结束音频会话的接口。 | 22 23### 类 24 25| 名称 | 描述 | 26| -------- | -------- | 27| interface [IBluetoothAudioCallback](interface_i_bluetooth_audio_callback.md) | 声明用于音频渲染开启、暂停,和结束的回调函数。 | 28| interface [IBluetoothAudioSession](interface_i_bluetooth_audio_session.md) | 声明开启音频会话,发送渲染操作结果,和结束音频会话的接口。 | 29 30### 枚举 31 32| 名称 | 描述 | 33| -------- | -------- | 34| [Operation](#operation) { SUSPEND_RENDER = 0 , START_RENDER = 1 } | 声明操作行为。 | 35| [Status](#status) { SUCCESS = 0 , FAILURE = 1 } | 声明接口调用的操作结果。 | 36| [SessionType](#sessiontype) { UNKNOWN_TYPE , SOFTWARE_ENCODING , HARDWARE_ENCODING } | 声明音频会话的类型。 | 37 38## 枚举类型说明 39 40### Operation 41 42``` 43enum Operation 44``` 45 46**描述** 47 48声明操作行为。 49 50**起始版本:** 4.0 51 52| 枚举值 | 描述 | 53| -------- | -------- | 54| SUSPEND_RENDER | 暂停渲染。 | 55| START_RENDER | 开启渲染。 | 56 57### SessionType 58 59``` 60enum SessionType 61``` 62 63**描述** 64 65声明音频会话的类型。 66 67**起始版本:** 4.0 68 69| 枚举值 | 描述 | 70| -------- | -------- | 71| UNKNOWN_TYPE | 未知类型。 | 72| SOFTWARE_ENCODING | 软件编码类型。 | 73| HARDWARE_ENCODING | 硬件编码类型。 | 74 75### Status 76 77``` 78enum Status 79``` 80 81**描述** 82 83声明接口调用的操作结果。 84 85**起始版本:** 4.0 86 87| 枚举值 | 描述 | 88| -------- | -------- | 89| SUCCESS | 调用成功。 | 90| FAILURE | 调用失败。 | 91