提交 189f8659 编写于 作者: J jiao_yanlin

Sample code modification GetBufferSize

Signed-off-by: Njiao_yanlin <jiaoyanlin@huawei.com>
上级 d9e044a5
......@@ -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')取消订阅事件。
......
......@@ -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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册