openharmony 鸿蒙 interface_i_bluetooth_audio_session

2025-06-16 浏览 (1)

IBluetoothAudioSession

概述

声明开启音频会话,发送渲染操作结果,和结束音频会话的接口。

起始版本: 4.0

相关模块:HdiA2dp

汇总

Public 成员函数

名称描述
StartSession ([in] enum SessionType sessionType, [in] IBluetoothAudioCallback callbackObj, [out] SharedMemQueue< unsigned char > queue)开启音频会话并注册回调函数。
StopSession ([in] enum SessionType sessionType)结束音频会话。
RenderOperationResult ([in] enum Operation operation, [in] enum Status status)发送渲染操作结果。

成员函数说明

RenderOperationResult()

IBluetoothAudioSession::RenderOperationResult ([in] enum Operation operation, [in] enum Status status )

描述

发送渲染操作结果。

起始版本: 4.0

参数:

名称描述
operation表示渲染操作。
Status表示渲染操作成功或失败。

返回:

如果操作成功返回0;否则返回负值。

StartSession()

IBluetoothAudioSession::StartSession ([in] enum SessionType sessionType, [in] IBluetoothAudioCallback callbackObj, [out] SharedMemQueue< unsigned char > queue )

描述

开启音频会话并注册回调函数。

起始版本: 4.0

参数:

名称描述
sessionType表示会话类型。
callbackObj表示回调函数。相关详细信息,请参考IBluetoothAudioCallback

返回:

如果操作成功返回0;否则返回负值。

StopSession()

IBluetoothAudioSession::StopSession ([in] enum SessionType sessionType)

描述

结束音频会话。

起始版本: 4.0

参数:

名称描述
sessionType表示会话类型。

返回:

如果操作成功返回0;否则返回负值。

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Bluetooth HDI 参考

harmony 鸿蒙BluetoothAudioTypes.idl

harmony 鸿蒙HciTypes.idl

harmony 鸿蒙HdiA2dp

harmony 鸿蒙HdiHci

harmony 鸿蒙IBluetoothAudioCallback.idl

harmony 鸿蒙IBluetoothAudioSession.idl

harmony 鸿蒙IHciCallback.idl

harmony 鸿蒙IHciInterface.idl

harmony 鸿蒙IBluetoothAudioCallback

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/YrUuI2