From ad176eec9441c8df588038ea818f89b015ce5bbb Mon Sep 17 00:00:00 2001 From: jiao_yanlin Date: Fri, 17 Feb 2023 15:51:58 +0800 Subject: [PATCH] Sample code modification GetBufferSize Signed-off-by: jiao_yanlin --- zh-cn/application-dev/media/audio-capturer.md | 4 ++-- zh-cn/application-dev/media/audio-renderer.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/zh-cn/application-dev/media/audio-capturer.md b/zh-cn/application-dev/media/audio-capturer.md index 47f5645019..74e09bf19f 100644 --- a/zh-cn/application-dev/media/audio-capturer.md +++ b/zh-cn/application-dev/media/audio-capturer.md @@ -112,7 +112,7 @@ AudioCapturer提供了用于获取原始音频文件的方法。开发者可以 let numBuffersToCapture = 150; // 循环写入150次 let count = 0; while (numBuffersToCapture) { - let bufferSize = await audioCapturer.getBuffersize(); + let bufferSize = await audioCapturer.getBufferSize(); let buffer = await audioCapturer.read(bufferSize, true); let options = { offset: count * this.bufferSize, @@ -194,7 +194,7 @@ AudioCapturer提供了用于获取原始音频文件的方法。开发者可以 let audioTime : number = await audioCapturer.getAudioTime(); // 获取合理的最小缓冲区大小 - let bufferSize : number = await audioCapturer.getBuffersize(); + let bufferSize : number = await audioCapturer.getBufferSize(); ``` 7. (可选)使用on('markReach')方法订阅采集器标记到达事件,使用off('markReach')取消订阅事件。 diff --git a/zh-cn/application-dev/media/audio-renderer.md b/zh-cn/application-dev/media/audio-renderer.md index 6e5cca2de1..0599b33ab7 100644 --- a/zh-cn/application-dev/media/audio-renderer.md +++ b/zh-cn/application-dev/media/audio-renderer.md @@ -234,7 +234,7 @@ AudioRenderer提供了渲染音频文件和控制播放的接口,开发者可 let audioTime : number = await audioRenderer.getAudioTime(); // 获取合理的最小缓冲区大小 - let bufferSize : number = await audioRenderer.getBuffersize(); + let bufferSize : number = await audioRenderer.getBufferSize(); // 获取渲染速率 let renderRate : audio.AudioRendererRate = await audioRenderer.getRenderRate(); -- GitLab