From 2eabc4913f4fcb929678f270b2b5448ac285cc19 Mon Sep 17 00:00:00 2001 From: durui Date: Thu, 31 Aug 2023 16:21:55 +0800 Subject: [PATCH] =?UTF-8?q?<=E5=86=85=E5=BD=95=E5=8E=BB=E6=8E=89=E6=8E=88?= =?UTF-8?q?=E6=9D=83=E5=BC=B9=E6=A1=86>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: durui --- .../src/main/js/test/AudioPlaybackCapturer.test.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/multimedia/audio/audio_js_standard/AudioCapturer/src/main/js/test/AudioPlaybackCapturer.test.js b/multimedia/audio/audio_js_standard/AudioCapturer/src/main/js/test/AudioPlaybackCapturer.test.js index d367fa56d..b6eb014bc 100644 --- a/multimedia/audio/audio_js_standard/AudioCapturer/src/main/js/test/AudioPlaybackCapturer.test.js +++ b/multimedia/audio/audio_js_standard/AudioCapturer/src/main/js/test/AudioPlaybackCapturer.test.js @@ -51,8 +51,8 @@ export default function audioCapturer() { await button.click(); } beforeAll(async function () { - await getPermission(); - await driveFn(); + // await getPermission(); + // await driveFn(); console.info('TestLog: Start Testing AudioPlaybackCapturer Interfaces'); }) @@ -154,9 +154,15 @@ export default function audioCapturer() { totalSize = totalSize - 44; console.info(`${Tag}: File size : Removing header: ${totalSize}`); let rlen = 0; + let readSync = 0 while (rlen < totalSize) { let buf = new ArrayBuffer(bufferSize); rlen += ss.readSync(buf); + readSync = ss.readSync(buf); + if(readSync <= 0){ + console.info(`${Tag}:BufferAudioFramework: readSync: ${readSync}`); + break; + } console.info(`${Tag}:BufferAudioFramework: bytes read from file: ${rlen}`); await audioRen.write(buf); } -- GitLab