提交 27580ddf 编写于 作者: L li-yifan2

update audio-capturer.md

Signed-off-by: Nli-yifan2 <liyifan37@huawei.com>
上级 f7f331d6
......@@ -72,7 +72,7 @@ AudioCapturer提供了用于获取原始音频文件的方法。开发者可以
}
await audioCapturer.start();
let state = audioCapturer.state;
state = audioCapturer.state;
if (state == audio.AudioState.STATE_RUNNING) {
console.info('AudioRecLog: Capturer started');
} else {
......@@ -112,6 +112,7 @@ AudioCapturer提供了用于获取原始音频文件的方法。开发者可以
let numBuffersToCapture = 150; // 循环写入150次
while (numBuffersToCapture) {
let bufferSize = await audioCapturer.getBuffersize();
let buffer = await audioCapturer.read(bufferSize, true);
if (typeof(buffer) == undefined) {
console.info('AudioRecLog: read buffer failed');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册