提交 b066713e 编写于 作者: L lwx1121892

<audio修改>

Signed-off-by: Nlwx1121892 <liuxueqi3@huawei.com>
上级 3e03a27d
......@@ -78,14 +78,26 @@ describe('audioCapturer', function () {
console.info('AudioFrameworkRecLog: Promise : Audio Recording Function');
var audioCap;
let isPass = false;
await audio.createAudioCapturer(AudioCapturerOptions).then(async function (data) {
audioCap = data;
console.info('AudioFrameworkRecLog: AudioCapturer Created : Success : Stream Type: SUCCESS');
}).catch((err) => {
console.info('AudioFrameworkRecLog: AudioCapturer Created : ERROR : ' + err.message);
LE24 = audio.AudioSampleFormat.SAMPLE_FORMAT_S24LE;
LE32 = audio.AudioSampleFormat.SAMPLE_FORMAT_S32LE;
let sampleFormat = AudioRendererOptions.streamInfo.sampleFormat;
if ((sampleFormat == LE24 || sampleFormat == LE32) && err.code == 202) {
isPass = true;
return;
}
return resultFlag;
});
console.log("isPass:" + isPass);
if (isPass) {
resultFlag = true;
return resultFlag;
}
console.info('AudioFrameworkRecLog: AudioCapturer : Path : ' + fpath);
......@@ -5657,7 +5669,7 @@ describe('audioCapturer', function () {
});
await sleep(1000);
audioCapCallBack.on('periodReach', 1000, (position) => {
if (position == "1000") {
if (position == 1000) {
console.info('AudioFrameworkRecLog: ---------ON TRIGGERED SUCCESSFULLY---------');
console.info('AudioRenderLog: mark reached: ' + position);
stateFlag = true;
......@@ -5812,7 +5824,7 @@ describe('audioCapturer', function () {
});
await sleep(1000);
audioCapCallBack.on('periodReach', 1, (position) => {
if (position == "1") {
if (position == 1) {
console.info('AudioFrameworkRecLog: ---------ON TRIGGERED SUCCESSFULLY---------');
console.info('AudioRenderLog: mark reached: ' + position);
stateFlag = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册