未验证 提交 0a2a6f9c 编写于 作者: O openharmony_ci 提交者: Gitee

!4818 audioXTS整改

Merge pull request !4818 from liuxueqi/OpenHarmony-3.1-Release
......@@ -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;
......
......@@ -4226,9 +4226,9 @@ describe('audioFramework', function () {
* @tc.level : Level 0
*/
it('SUB_AUDIO_MANAGER_InterruptActionType_001', 0, async function (done) {
expect(audio.InterruptActionType.TYPE_ACTIVATED).assertEqual(0);
await sleep(50);
done();
expect(audio.InterruptActionType.TYPE_ACTIVATED).assertEqual(0);
await sleep(50);
done();
})
/* *
......@@ -4239,10 +4239,10 @@ describe('audioFramework', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_AUDIO_MANAGER_InterruptActionType_002', 0, async function (done) {
expect(audio.InterruptActionType.TYPE_INTERRUPT).assertEqual(1);
await sleep(50);
done();
it('SUB_AUDIO_MANAGER_InterruptActionType_002', 0, async function (done) {
expect(audio.InterruptActionType.TYPE_INTERRUPT).assertEqual(1);
await sleep(50);
done();
})
})
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册