Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
53986267
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
大约 1 年 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
53986267
编写于
12月 29, 2022
作者:
O
openharmony_ci
提交者:
Gitee
12月 29, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6901 audio medialibrary用例整改
Merge pull request !6901 from 秦莉文/OpenHarmony-3.1-Release
上级
6943555f
c86330c4
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
67 addition
and
55 deletion
+67
-55
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioCall.test.js
..._standard/audioManager/src/main/js/test/AudioCall.test.js
+6
-6
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioCapturer.test.js
...ndard/audioManager/src/main/js/test/AudioCapturer.test.js
+27
-28
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioRenderer.test.js
...ndard/audioManager/src/main/js/test/AudioRenderer.test.js
+16
-3
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetTestCallback.test.js
...s_standard/src/main/js/test/fileAssetTestCallback.test.js
+6
-6
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetTestPromise.test.js
...js_standard/src/main/js/test/fileAssetTestPromise.test.js
+6
-6
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileTestPromise.test.js
...rary_js_standard/src/main/js/test/fileTestPromise.test.js
+2
-2
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/mediaLibraryTestCallBack.test.js
...tandard/src/main/js/test/mediaLibraryTestCallBack.test.js
+2
-2
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/mediaLibraryTestPromise.test.js
...standard/src/main/js/test/mediaLibraryTestPromise.test.js
+2
-2
未找到文件。
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioCall.test.js
浏览文件 @
53986267
...
@@ -411,7 +411,7 @@ describe('audioCall', function () {
...
@@ -411,7 +411,7 @@ describe('audioCall', function () {
var
AudioCapturerInfo
=
{
var
AudioCapturerInfo
=
{
source
:
audio
.
SourceType
.
SOURCE_TYPE_MIC
,
source
:
audio
.
SourceType
.
SOURCE_TYPE_MIC
,
capturerFlags
:
1
capturerFlags
:
0
}
}
var
AudioCapturerOptions
=
{
var
AudioCapturerOptions
=
{
...
@@ -447,7 +447,7 @@ describe('audioCall', function () {
...
@@ -447,7 +447,7 @@ describe('audioCall', function () {
var
AudioCapturerInfo
=
{
var
AudioCapturerInfo
=
{
source
:
audio
.
SourceType
.
SOURCE_TYPE_MIC
,
source
:
audio
.
SourceType
.
SOURCE_TYPE_MIC
,
capturerFlags
:
1
capturerFlags
:
0
}
}
var
AudioCapturerOptions
=
{
var
AudioCapturerOptions
=
{
...
@@ -478,12 +478,12 @@ describe('audioCall', function () {
...
@@ -478,12 +478,12 @@ describe('audioCall', function () {
readpath
=
'
StarWars10s-1C-44100-2SW.wav
'
;
readpath
=
'
StarWars10s-1C-44100-2SW.wav
'
;
await
getFdRead
(
readpath
);
await
getFdRead
(
readpath
);
await
playbackPromise
(
AudioRendererOptions
,
filePath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
playbackPromise
(
AudioRendererOptions
,
filePath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
1
000
);
await
sleep
(
2
000
);
console
.
info
(
'
AudioFrameworkRecLog: resultFlag : Capturer :
'
+
resultFlagRec
);
console
.
info
(
'
AudioFrameworkRecLog: resultFlag : Capturer :
'
+
resultFlagRec
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag : Renderer :
'
+
resultFlagRen
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag : Renderer :
'
+
resultFlagRen
);
if
(
resultFlagRec
==
true
)
{
if
(
resultFlagRec
==
true
&&
resultFlagRen
==
true
)
{
expect
(
resultFlagRen
).
assertTrue
();
expect
(
true
).
assertTrue
();
}
}
else
{
else
{
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
...
...
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioCapturer.test.js
浏览文件 @
53986267
...
@@ -1981,13 +1981,13 @@ describe('audioCapturer', function () {
...
@@ -1981,13 +1981,13 @@ describe('audioCapturer', function () {
let
AudioStreamInfo
=
{
let
AudioStreamInfo
=
{
samplingRate
:
44100
,
samplingRate
:
44100
,
channels
:
1
,
channels
:
2
,
sampleFormat
:
1
,
sampleFormat
:
1
,
encodingType
:
0
encodingType
:
0
}
}
let
AudioCapturerInfo
=
{
let
AudioCapturerInfo
=
{
source
:
1
,
source
:
0
,
capturerFlags
:
0
capturerFlags
:
0
}
}
...
@@ -2000,7 +2000,7 @@ describe('audioCapturer', function () {
...
@@ -2000,7 +2000,7 @@ describe('audioCapturer', function () {
let
resultFlag
=
await
recPromise
(
AudioCapturerOptions
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
let
resultFlag
=
await
recPromise
(
AudioCapturerOptions
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
expect
(
resultFlag
).
assert
Fals
e
();
expect
(
resultFlag
).
assert
Tru
e
();
done
();
done
();
})
})
...
@@ -2021,7 +2021,7 @@ describe('audioCapturer', function () {
...
@@ -2021,7 +2021,7 @@ describe('audioCapturer', function () {
encodingType
:
audio
.
AudioEncodingType
.
ENCODING_TYPE_RAW
,
encodingType
:
audio
.
AudioEncodingType
.
ENCODING_TYPE_RAW
,
};
};
let
audioCapturerInfo44100
=
{
let
audioCapturerInfo44100
=
{
source
:
audio
.
SourceType
.
SOURCE_TYPE_
MIC
,
source
:
audio
.
SourceType
.
SOURCE_TYPE_
VOICE_COMMUNICATION
,
capturerFlags
:
0
,
capturerFlags
:
0
,
}
}
let
audioCapturerOptions44100
=
{
let
audioCapturerOptions44100
=
{
...
@@ -2056,7 +2056,7 @@ describe('audioCapturer', function () {
...
@@ -2056,7 +2056,7 @@ describe('audioCapturer', function () {
encodingType
:
0
,
encodingType
:
0
,
};
};
let
audioCapturerInfo44100
=
{
let
audioCapturerInfo44100
=
{
source
:
1
,
source
:
audio
.
SourceType
.
SOURCE_TYPE_VOICE_COMMUNICATION
,
capturerFlags
:
0
,
capturerFlags
:
0
,
}
}
let
audioCapturerOptions44100
=
{
let
audioCapturerOptions44100
=
{
...
@@ -2067,7 +2067,7 @@ describe('audioCapturer', function () {
...
@@ -2067,7 +2067,7 @@ describe('audioCapturer', function () {
let
resultFlag
=
await
recPromise
(
audioCapturerOptions44100
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
let
resultFlag
=
await
recPromise
(
audioCapturerOptions44100
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
expect
(
resultFlag
).
assert
Fals
e
();
expect
(
resultFlag
).
assert
Tru
e
();
done
();
done
();
})
})
...
@@ -2121,7 +2121,7 @@ describe('audioCapturer', function () {
...
@@ -2121,7 +2121,7 @@ describe('audioCapturer', function () {
encodingType
:
0
,
encodingType
:
0
,
};
};
let
audioCapturerInfo96000
=
{
let
audioCapturerInfo96000
=
{
source
:
1
,
source
:
0
,
capturerFlags
:
0
,
capturerFlags
:
0
,
}
}
let
audioCapturerOptions96000
=
{
let
audioCapturerOptions96000
=
{
...
@@ -2132,7 +2132,7 @@ describe('audioCapturer', function () {
...
@@ -2132,7 +2132,7 @@ describe('audioCapturer', function () {
let
resultFlag
=
await
recPromise
(
audioCapturerOptions96000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
let
resultFlag
=
await
recPromise
(
audioCapturerOptions96000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
expect
(
resultFlag
).
assert
Fals
e
();
expect
(
resultFlag
).
assert
Tru
e
();
done
();
done
();
})
})
...
@@ -2181,11 +2181,11 @@ describe('audioCapturer', function () {
...
@@ -2181,11 +2181,11 @@ describe('audioCapturer', function () {
let
audioStreamInfo48000
=
{
let
audioStreamInfo48000
=
{
samplingRate
:
48000
,
samplingRate
:
48000
,
channels
:
2
,
channels
:
2
,
sampleFormat
:
1
,
sampleFormat
:
3
,
encodingType
:
0
,
encodingType
:
0
,
};
};
let
audioCapturerInfo48000
=
{
let
audioCapturerInfo48000
=
{
source
:
1
,
source
:
0
,
capturerFlags
:
0
,
capturerFlags
:
0
,
}
}
let
audioCapturerOptions48000
=
{
let
audioCapturerOptions48000
=
{
...
@@ -2196,7 +2196,7 @@ describe('audioCapturer', function () {
...
@@ -2196,7 +2196,7 @@ describe('audioCapturer', function () {
let
resultFlag
=
await
recPromise
(
audioCapturerOptions48000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
let
resultFlag
=
await
recPromise
(
audioCapturerOptions48000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
expect
(
resultFlag
).
assert
Fals
e
();
expect
(
resultFlag
).
assert
Tru
e
();
done
();
done
();
})
})
...
@@ -2249,7 +2249,7 @@ describe('audioCapturer', function () {
...
@@ -2249,7 +2249,7 @@ describe('audioCapturer', function () {
encodingType
:
0
,
encodingType
:
0
,
};
};
let
audioCapturerInfo8000
=
{
let
audioCapturerInfo8000
=
{
source
:
1
,
source
:
0
,
capturerFlags
:
0
,
capturerFlags
:
0
,
}
}
let
audioCapturerOptions8000
=
{
let
audioCapturerOptions8000
=
{
...
@@ -2261,7 +2261,7 @@ describe('audioCapturer', function () {
...
@@ -2261,7 +2261,7 @@ describe('audioCapturer', function () {
let
resultFlag
=
await
recPromise
(
audioCapturerOptions8000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
let
resultFlag
=
await
recPromise
(
audioCapturerOptions8000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
expect
(
resultFlag
).
assert
Fals
e
();
expect
(
resultFlag
).
assert
Tru
e
();
done
();
done
();
})
})
...
@@ -2315,7 +2315,7 @@ describe('audioCapturer', function () {
...
@@ -2315,7 +2315,7 @@ describe('audioCapturer', function () {
encodingType
:
0
,
encodingType
:
0
,
};
};
let
audioCapturerInfo11025
=
{
let
audioCapturerInfo11025
=
{
source
:
1
,
source
:
0
,
capturerFlags
:
0
,
capturerFlags
:
0
,
}
}
let
audioCapturerOptions11025
=
{
let
audioCapturerOptions11025
=
{
...
@@ -2327,7 +2327,7 @@ describe('audioCapturer', function () {
...
@@ -2327,7 +2327,7 @@ describe('audioCapturer', function () {
let
resultFlag
=
await
recPromise
(
audioCapturerOptions11025
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
let
resultFlag
=
await
recPromise
(
audioCapturerOptions11025
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
expect
(
resultFlag
).
assert
Fals
e
();
expect
(
resultFlag
).
assert
Tru
e
();
done
();
done
();
})
})
...
@@ -2381,7 +2381,7 @@ describe('audioCapturer', function () {
...
@@ -2381,7 +2381,7 @@ describe('audioCapturer', function () {
encodingType
:
0
encodingType
:
0
};
};
let
audioCapturerInfo12000
=
{
let
audioCapturerInfo12000
=
{
source
:
1
,
source
:
0
,
capturerFlags
:
0
,
capturerFlags
:
0
,
}
}
let
audioCapturerOptions12000
=
{
let
audioCapturerOptions12000
=
{
...
@@ -2393,7 +2393,7 @@ describe('audioCapturer', function () {
...
@@ -2393,7 +2393,7 @@ describe('audioCapturer', function () {
let
resultFlag
=
await
recPromise
(
audioCapturerOptions12000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
let
resultFlag
=
await
recPromise
(
audioCapturerOptions12000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
expect
(
resultFlag
).
assert
Fals
e
();
expect
(
resultFlag
).
assert
Tru
e
();
done
();
done
();
})
})
...
@@ -2447,7 +2447,7 @@ describe('audioCapturer', function () {
...
@@ -2447,7 +2447,7 @@ describe('audioCapturer', function () {
encodingType
:
0
,
encodingType
:
0
,
};
};
let
audioCapturerInfo16000
=
{
let
audioCapturerInfo16000
=
{
source
:
1
,
source
:
0
,
capturerFlags
:
0
,
capturerFlags
:
0
,
}
}
let
audioCapturerOptions16000
=
{
let
audioCapturerOptions16000
=
{
...
@@ -2459,7 +2459,7 @@ describe('audioCapturer', function () {
...
@@ -2459,7 +2459,7 @@ describe('audioCapturer', function () {
let
resultFlag
=
await
recPromise
(
audioCapturerOptions16000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
let
resultFlag
=
await
recPromise
(
audioCapturerOptions16000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
expect
(
resultFlag
).
assert
Fals
e
();
expect
(
resultFlag
).
assert
Tru
e
();
done
();
done
();
})
})
...
@@ -2513,7 +2513,7 @@ describe('audioCapturer', function () {
...
@@ -2513,7 +2513,7 @@ describe('audioCapturer', function () {
encodingType
:
0
,
encodingType
:
0
,
};
};
let
audioCapturerInfo22050
=
{
let
audioCapturerInfo22050
=
{
source
:
1
,
source
:
0
,
capturerFlags
:
0
,
capturerFlags
:
0
,
}
}
let
audioCapturerOptions22050
=
{
let
audioCapturerOptions22050
=
{
...
@@ -2525,7 +2525,7 @@ describe('audioCapturer', function () {
...
@@ -2525,7 +2525,7 @@ describe('audioCapturer', function () {
let
resultFlag
=
await
recPromise
(
audioCapturerOptions22050
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
let
resultFlag
=
await
recPromise
(
audioCapturerOptions22050
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
expect
(
resultFlag
).
assert
Fals
e
();
expect
(
resultFlag
).
assert
Tru
e
();
done
();
done
();
})
})
...
@@ -2579,7 +2579,7 @@ describe('audioCapturer', function () {
...
@@ -2579,7 +2579,7 @@ describe('audioCapturer', function () {
encodingType
:
0
,
encodingType
:
0
,
};
};
let
audioCapturerInfo24000
=
{
let
audioCapturerInfo24000
=
{
source
:
1
,
source
:
0
,
capturerFlags
:
0
,
capturerFlags
:
0
,
}
}
let
audioCapturerOptions24000
=
{
let
audioCapturerOptions24000
=
{
...
@@ -2591,7 +2591,7 @@ describe('audioCapturer', function () {
...
@@ -2591,7 +2591,7 @@ describe('audioCapturer', function () {
let
resultFlag
=
await
recPromise
(
audioCapturerOptions24000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
let
resultFlag
=
await
recPromise
(
audioCapturerOptions24000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
expect
(
resultFlag
).
assert
Fals
e
();
expect
(
resultFlag
).
assert
Tru
e
();
done
();
done
();
})
})
...
@@ -2645,7 +2645,7 @@ describe('audioCapturer', function () {
...
@@ -2645,7 +2645,7 @@ describe('audioCapturer', function () {
encodingType
:
0
,
encodingType
:
0
,
};
};
let
audioCapturerInfo32000
=
{
let
audioCapturerInfo32000
=
{
source
:
1
,
source
:
0
,
capturerFlags
:
0
,
capturerFlags
:
0
,
}
}
let
audioCapturerOptions32000
=
{
let
audioCapturerOptions32000
=
{
...
@@ -2657,7 +2657,7 @@ describe('audioCapturer', function () {
...
@@ -2657,7 +2657,7 @@ describe('audioCapturer', function () {
let
resultFlag
=
await
recPromise
(
audioCapturerOptions32000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
let
resultFlag
=
await
recPromise
(
audioCapturerOptions32000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
expect
(
resultFlag
).
assert
Fals
e
();
expect
(
resultFlag
).
assert
Tru
e
();
done
();
done
();
})
})
...
@@ -2717,7 +2717,7 @@ describe('audioCapturer', function () {
...
@@ -2717,7 +2717,7 @@ describe('audioCapturer', function () {
encodingType
:
0
,
encodingType
:
0
,
};
};
let
audioCapturerInfo64000
=
{
let
audioCapturerInfo64000
=
{
source
:
1
,
source
:
0
,
capturerFlags
:
0
,
capturerFlags
:
0
,
}
}
let
audioCapturerOptions64000
=
{
let
audioCapturerOptions64000
=
{
...
@@ -2729,7 +2729,7 @@ describe('audioCapturer', function () {
...
@@ -2729,7 +2729,7 @@ describe('audioCapturer', function () {
let
resultFlag
=
await
recPromise
(
audioCapturerOptions64000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
let
resultFlag
=
await
recPromise
(
audioCapturerOptions64000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
expect
(
resultFlag
).
assert
Fals
e
();
expect
(
resultFlag
).
assert
Tru
e
();
done
();
done
();
})
})
...
@@ -4151,7 +4151,6 @@ describe('audioCapturer', function () {
...
@@ -4151,7 +4151,6 @@ describe('audioCapturer', function () {
}
else
{
}
else
{
console
.
info
(
'
AudioFrameworkRecLog: AudioCapturer Created : Success:
'
+
data
.
state
);
console
.
info
(
'
AudioFrameworkRecLog: AudioCapturer Created : Success:
'
+
data
.
state
);
}
}
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRecLog: AudioCapturer Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRecLog: AudioCapturer Created : ERROR :
'
+
err
.
message
);
expect
(
true
).
assertTrue
();
expect
(
true
).
assertTrue
();
...
...
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioRenderer.test.js
浏览文件 @
53986267
...
@@ -1313,17 +1313,30 @@ describe('audioRenderer', function () {
...
@@ -1313,17 +1313,30 @@ describe('audioRenderer', function () {
console
.
info
(
'
AudioFrameworkRenderLog: CALLBACK : Audio Playback Function
'
);
console
.
info
(
'
AudioFrameworkRenderLog: CALLBACK : Audio Playback Function
'
);
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
audio
.
createAudioRenderer
(
AudioRendererOptions
,
(
err
,
data
)
=>
{
audio
.
createAudioRenderer
(
AudioRendererOptions
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkRenderLog: AudioRender Created : Error:
${
err
.
message
}
`
);
LE24
=
audio
.
AudioSampleFormat
.
SAMPLE_FORMAT_S24LE
;
resultFlag
=
false
;
LE32
=
audio
.
AudioSampleFormat
.
SAMPLE_FORMAT_S32LE
;
let
sampleFormat
=
AudioRendererOptions
.
streamInfo
.
sampleFormat
;
if
((
sampleFormat
==
LE24
||
sampleFormat
==
LE32
)
&&
err
.
code
==
202
)
{
isPass
=
true
;
return
;
}
resultFlag
=
false
}
}
else
{
else
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : SUCCESS
'
);
audioRen
=
data
;
audioRen
=
data
;
}
}
});
});
await
sleep
(
100
);
console
.
log
(
`isPass:
${
isPass
}
`
);
if
(
isPass
)
{
resultFlag
=
true
;
return
resultFlag
;
}
if
(
resultFlag
==
false
)
{
if
(
resultFlag
==
false
)
{
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
return
resultFlag
;
return
resultFlag
;
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetTestCallback.test.js
浏览文件 @
53986267
...
@@ -639,8 +639,8 @@ describe('fileAssetTestCallback.test.js', async function() {
...
@@ -639,8 +639,8 @@ describe('fileAssetTestCallback.test.js', async function() {
try
{
try
{
let
fileType
=
mediaLibrary
.
MediaType
.
VIDEO
;
let
fileType
=
mediaLibrary
.
MediaType
.
VIDEO
;
let
fileFetchOp
=
{
let
fileFetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND display_name = ?
'
,
selectionArgs
:
[
fileType
.
toString
()
],
selectionArgs
:
[
fileType
.
toString
()
,
'
01.mp4
'
],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fileFetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fileFetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
@@ -708,8 +708,8 @@ describe('fileAssetTestCallback.test.js', async function() {
...
@@ -708,8 +708,8 @@ describe('fileAssetTestCallback.test.js', async function() {
try
{
try
{
let
type
=
mediaLibrary
.
MediaType
.
VIDEO
;
let
type
=
mediaLibrary
.
MediaType
.
VIDEO
;
let
fetchOp
=
{
let
fetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND display_name = ?
'
,
selectionArgs
:
[
type
.
toString
()
],
selectionArgs
:
[
type
.
toString
()
,
'
01.mp4
'
],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
@@ -773,8 +773,8 @@ describe('fileAssetTestCallback.test.js', async function() {
...
@@ -773,8 +773,8 @@ describe('fileAssetTestCallback.test.js', async function() {
try
{
try
{
let
type
=
mediaLibrary
.
MediaType
.
VIDEO
;
let
type
=
mediaLibrary
.
MediaType
.
VIDEO
;
let
fetchOp
=
{
let
fetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND display_name = ?
'
,
selectionArgs
:
[
type
.
toString
()
],
selectionArgs
:
[
type
.
toString
()
,
'
01.mp4
'
],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetTestPromise.test.js
浏览文件 @
53986267
...
@@ -458,8 +458,8 @@ describe('fileAssetTestPromise.test.js', async function() {
...
@@ -458,8 +458,8 @@ describe('fileAssetTestPromise.test.js', async function() {
try
{
try
{
let
fileType
=
mediaLibrary
.
MediaType
.
VIDEO
;
let
fileType
=
mediaLibrary
.
MediaType
.
VIDEO
;
let
fileFetchOp
=
{
let
fileFetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND display_name = ?
'
,
selectionArgs
:
[
fileType
.
toString
()],
selectionArgs
:
[
fileType
.
toString
()
,
'
01.mp4
'
],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fileFetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fileFetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
@@ -517,8 +517,8 @@ describe('fileAssetTestPromise.test.js', async function() {
...
@@ -517,8 +517,8 @@ describe('fileAssetTestPromise.test.js', async function() {
try
{
try
{
let
type
=
mediaLibrary
.
MediaType
.
VIDEO
;
let
type
=
mediaLibrary
.
MediaType
.
VIDEO
;
let
fetchOp
=
{
let
fetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND display_name = ?
'
,
selectionArgs
:
[
type
.
toString
()
],
selectionArgs
:
[
type
.
toString
()
,
'
01.mp4
'
],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
@@ -561,8 +561,8 @@ describe('fileAssetTestPromise.test.js', async function() {
...
@@ -561,8 +561,8 @@ describe('fileAssetTestPromise.test.js', async function() {
try
{
try
{
let
type
=
mediaLibrary
.
MediaType
.
VIDEO
;
let
type
=
mediaLibrary
.
MediaType
.
VIDEO
;
let
fetchOp
=
{
let
fetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND display_name = ?
'
,
selectionArgs
:
[
type
.
toString
()
],
selectionArgs
:
[
type
.
toString
()
,
'
01.mp4
'
],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileTestPromise.test.js
浏览文件 @
53986267
...
@@ -29,8 +29,8 @@ let imagesfetchOp = {
...
@@ -29,8 +29,8 @@ let imagesfetchOp = {
selectionArgs
:
[
imageType
.
toString
()],
selectionArgs
:
[
imageType
.
toString
()],
};
};
let
videosfetchOp
=
{
let
videosfetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND display_name = ?
'
,
selectionArgs
:
[
videoType
.
toString
()],
selectionArgs
:
[
videoType
.
toString
()
,
'
01.mp4
'
],
};
};
let
audiosfetchOp
=
{
let
audiosfetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ? AND bucket_display_name = ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ? AND bucket_display_name = ?
'
,
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/mediaLibraryTestCallBack.test.js
浏览文件 @
53986267
...
@@ -40,8 +40,8 @@ let imagesfetchOp = {
...
@@ -40,8 +40,8 @@ let imagesfetchOp = {
selectionArgs
:
[
imageType
.
toString
()],
selectionArgs
:
[
imageType
.
toString
()],
};
};
let
videosfetchOp
=
{
let
videosfetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND display_name = ?
'
,
selectionArgs
:
[
videoType
.
toString
()],
selectionArgs
:
[
videoType
.
toString
()
,
'
01.mp4
'
],
};
};
let
audiosfetchOp
=
{
let
audiosfetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ? AND bucket_display_name = ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ? AND bucket_display_name = ?
'
,
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/mediaLibraryTestPromise.test.js
浏览文件 @
53986267
...
@@ -40,8 +40,8 @@ let imagesfetchOp = {
...
@@ -40,8 +40,8 @@ let imagesfetchOp = {
selectionArgs
:
[
imageType
.
toString
()],
selectionArgs
:
[
imageType
.
toString
()],
};
};
let
videosfetchOp
=
{
let
videosfetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND display_name = ?
'
,
selectionArgs
:
[
videoType
.
toString
()],
selectionArgs
:
[
videoType
.
toString
()
,
'
01.mp4
'
],
};
};
let
audiosfetchOp
=
{
let
audiosfetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ? AND bucket_display_name = ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ? AND bucket_display_name = ?
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录