From f5eaab9af76146beb0d1010f3766f69a54f20b98 Mon Sep 17 00:00:00 2001 From: liuyuehua1 Date: Fri, 6 May 2022 15:34:28 +0800 Subject: [PATCH] New native interface description. Signed-off-by: liuyuehua1 --- .../native-apis/OpenSLES_OpenHarmony.md | 18 ++++++++++++++++++ .../reference/native-apis/Readme-CN.md | 1 + 2 files changed, 19 insertions(+) create mode 100644 zh-cn/application-dev/reference/native-apis/OpenSLES_OpenHarmony.md diff --git a/zh-cn/application-dev/reference/native-apis/OpenSLES_OpenHarmony.md b/zh-cn/application-dev/reference/native-apis/OpenSLES_OpenHarmony.md new file mode 100644 index 0000000000..4d85994f64 --- /dev/null +++ b/zh-cn/application-dev/reference/native-apis/OpenSLES_OpenHarmony.md @@ -0,0 +1,18 @@ +# OpenSLES_OpenHarmony.h + + +**Description:** +提供录音过程中通过回调函数获取包含录音数据的buffer及使用后将buffer加入空闲队列的操作接口。 + +**Version:** +1.0 + + +### Functions + | Function | Description | +| -------- | -------- | +| SLresult (*Enqueue)(SLOHBufferQueueItf self, const void *buffer, SLuint32 size) | 将保存玩录音数据后的buffer加入空闲的buffer队列 | +| SLresult (*Clear) (SLOHBufferQueueItf self) | 录音结束后销毁BufferQueue接口对象 | +| SLresult (*GetState) (SLOHBufferQueueItf self, SLOHBufferQueueState *state) | 获取buffer的状态 | +| SLresult (*GetBuffer) (SLOHBufferQueueItf self, SLuint8** buffer, SLuint32& size) | 获取从输入设备存入录音数据的buffer | +| SLresult (*RegisterCallback) (SLOHBufferQueueItf self, SlOHBufferQueueCallback callback, void* pContext) | 注册读取音频数据的回调函数 | \ No newline at end of file diff --git a/zh-cn/application-dev/reference/native-apis/Readme-CN.md b/zh-cn/application-dev/reference/native-apis/Readme-CN.md index f11bbcfaea..e9dfbeaf62 100644 --- a/zh-cn/application-dev/reference/native-apis/Readme-CN.md +++ b/zh-cn/application-dev/reference/native-apis/Readme-CN.md @@ -25,6 +25,7 @@ - [native_interface_xcomponent.h](native__interface__xcomponent_8h.md) - [raw_dir.h](raw__dir_8h.md) - [raw_file.h](raw__file_8h.md) + - [OpenSLES_OpenHarmony.h](OpenSLES_OpenHarmony.md) - 结构体 - [OH_Drawing_BitmapFormat](_o_h___drawing___bitmap_format.md) - [OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md) -- GitLab