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