1# IBluetoothAudioSession 2 3## 概述 4 5声明开启音频会话,发送渲染操作结果,和结束音频会话的接口。 6 7**起始版本:** 4.0 8 9**相关模块:**[HdiA2dp](_hdi_a2dp.md) 10 11 12## 汇总 13 14 15### Public 成员函数 16 17| 名称 | 描述 | 18| -------- | -------- | 19| [StartSession](#startsession) ([in] enum SessionType sessionType, [in] IBluetoothAudioCallback callbackObj, [out] SharedMemQueue< unsigned char > queue) | 开启音频会话并注册回调函数。 | 20| [StopSession](#stopsession) ([in] enum SessionType sessionType) | 结束音频会话。 | 21| [RenderOperationResult](#renderoperationresult) ([in] enum Operation operation, [in] enum Status status) | 发送渲染操作结果。 | 22 23 24## 成员函数说明 25 26 27### RenderOperationResult() 28 29``` 30IBluetoothAudioSession::RenderOperationResult ([in] enum Operation operation, [in] enum Status status ) 31``` 32 33**描述** 34 35发送渲染操作结果。 36 37**起始版本:** 4.0 38 39**参数:** 40 41| 名称 | 描述 | 42| -------- | -------- | 43| operation | 表示渲染操作。 | 44| Status | 表示渲染操作成功或失败。 | 45 46**返回:** 47 48如果操作成功返回0;否则返回负值。 49 50 51### StartSession() 52 53``` 54IBluetoothAudioSession::StartSession ([in] enum SessionType sessionType, [in] IBluetoothAudioCallback callbackObj, [out] SharedMemQueue< unsigned char > queue ) 55``` 56 57**描述** 58 59开启音频会话并注册回调函数。 60 61**起始版本:** 4.0 62 63**参数:** 64 65| 名称 | 描述 | 66| -------- | -------- | 67| sessionType | 表示会话类型。 | 68| callbackObj | 表示回调函数。相关详细信息,请参考[IBluetoothAudioCallback](interface_i_bluetooth_audio_callback.md)。 | 69 70**返回:** 71 72如果操作成功返回0;否则返回负值。 73 74### StopSession() 75 76``` 77IBluetoothAudioSession::StopSession ([in] enum SessionType sessionType) 78``` 79 80**描述** 81 82结束音频会话。 83 84**起始版本:** 4.0 85 86**参数:** 87 88| 名称 | 描述 | 89| -------- | -------- | 90| sessionType | 表示会话类型。 | 91 92**返回:** 93 94如果操作成功返回0;否则返回负值。 95