From 189f865907c31897e446a252d7a74cbf0ce874c3 Mon Sep 17 00:00:00 2001 From: jiao_yanlin Date: Fri, 17 Feb 2023 15:37:05 +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 a53d1b7a5a..3d4ecec3a0 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 4292913647..c99137e347 100644 --- a/zh-cn/application-dev/media/audio-renderer.md +++ b/zh-cn/application-dev/media/audio-renderer.md @@ -232,7 +232,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