Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
a0767214
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看板
提交
a0767214
编写于
7月 26, 2023
作者:
D
durui
1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
音效用例适配
Signed-off-by:
N
durui
<
durui15@huawei.com
>
上级
afc3e8c4
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
345 addition
and
94 deletion
+345
-94
multimedia/audio/audio_js_standard/audioRenderer/src/main/js/test/AudioEffect.test.js
...andard/audioRenderer/src/main/js/test/AudioEffect.test.js
+345
-94
未找到文件。
multimedia/audio/audio_js_standard/audioRenderer/src/main/js/test/AudioEffect.test.js
浏览文件 @
a0767214
...
...
@@ -404,42 +404,57 @@ describe('AudioEffect', function () {
}
/**
* @tc.number : SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0100
* @tc.name : GET_AUDIOEFFECTINFOARRY - MUSIC - Promise
* @tc.desc : GET_AUDIOEFFECTINFOARRY - MUSIC - UNKNOWN & UNKNOWN
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0100
'
,
1
,
async
function
(
done
)
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
ContentType
.
CONTENT_TYPE_UNKNOWN
,
audio
.
StreamUsage
.
STREAM_USAGE_UNKNOWN
).
then
((
audioEffectInfoArray
)
=>
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}).
catch
((
err
)
=>
{
* @tc.number : SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0100
* @tc.name : GET_AUDIOEFFECTINFOARRY - UNKNOWN - Promise
* @tc.desc : GET_AUDIOEFFECTINFOARRY - UNKNOWN - UNKNOWN & UNKNOWN
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0100
'
,
2
,
async
function
(
done
)
{
try
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
StreamUsage
.
STREAM_USAGE_UNKNOWN
).
then
((
audioEffectInfoArray
)
=>
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
});
}
catch
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
}
);
}
})
/**
* @tc.number : SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0200
* @tc.name : GET_AUDIOEFFECTINFOARRY - M
USIC
- Promise
* @tc.desc : GET_AUDIOEFFECTINFOARRY - M
USIC -MUSIC & M
EDIA
* @tc.name : GET_AUDIOEFFECTINFOARRY - M
EDIA
- Promise
* @tc.desc : GET_AUDIOEFFECTINFOARRY - MEDIA
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0200
'
,
1
,
async
function
(
done
)
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
ContentType
.
CONTENT_TYPE_MUSIC
,
audio
.
StreamUsage
.
STREAM_USAGE_MEDIA
).
then
((
audioEffectInfoArray
)
=>
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}).
catch
((
err
)
=>
{
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0200
'
,
2
,
async
function
(
done
)
{
try
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
StreamUsage
.
STREAM_USAGE_MEDIA
).
then
((
audioEffectInfoArray
)
=>
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
});
}
catch
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
});
}
})
/**
* @tc.number : SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0300
...
...
@@ -449,16 +464,24 @@ describe('AudioEffect', function () {
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0300
'
,
1
,
async
function
(
done
)
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
ContentType
.
CONTENT_TYPE_SPEECH
,
audio
.
StreamUsage
.
STREAM_USAGE_VOICE_COMMUNICATION
).
then
((
audioEffectInfoArray
)
=>
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}).
catch
((
err
)
=>
{
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0300
'
,
2
,
async
function
(
done
)
{
try
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
StreamUsage
.
STREAM_USAGE_VOICE_COMMUNICATION
).
then
((
audioEffectInfoArray
)
=>
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
});
}
catch
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
});
}
})
/**
* @tc.number : SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0400
...
...
@@ -468,16 +491,24 @@ describe('AudioEffect', function () {
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0400
'
,
1
,
async
function
(
done
)
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
ContentType
.
CONTENT_TYPE_MUSIC
,
audio
.
StreamUsage
.
STREAM_USAGE_NOTIFICATION_RINGTONE
).
then
((
audioEffectInfoArray
)
=>
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}).
catch
((
err
)
=>
{
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0400
'
,
2
,
async
function
(
done
)
{
try
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
StreamUsage
.
STREAM_USAGE_NOTIFICATION_RINGTONE
).
then
((
audioEffectInfoArray
)
=>
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
});
}
catch
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
});
}
})
/**
* @tc.number : SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0500
...
...
@@ -487,37 +518,53 @@ describe('AudioEffect', function () {
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0500
'
,
1
,
async
function
(
done
)
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
ContentType
.
CONTENT_TYPE_MOVIE
,
audio
.
StreamUsage
.
STREAM_USAGE_MEDIA
).
then
((
audioEffectInfoArray
)
=>
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}).
catch
((
err
)
=>
{
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0500
'
,
2
,
async
function
(
done
)
{
try
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
StreamUsage
.
STREAM_USAGE_MEDIA
).
then
((
audioEffectInfoArray
)
=>
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
});
}
catch
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
});
}
})
/**
* @tc.number : SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0600
* @tc.name : GET_AUDIOEFFECTINFOARRY -
SPEECH
- Callback
* @tc.desc : GET_AUDIOEFFECTINFOARRY -
SPEECH
* @tc.name : GET_AUDIOEFFECTINFOARRY -
MUSIC
- Callback
* @tc.desc : GET_AUDIOEFFECTINFOARRY -
MUSIC
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0600
'
,
1
,
async
function
(
done
)
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
ContentType
.
CONTENT_TYPE_SPEECH
,
audio
.
StreamUsage
.
STREAM_USAGE_MEDIA
,
async
(
err
,
audioEffectInfoArray
)
=>
{
if
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
done
();
}
else
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}
});
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0600
'
,
2
,
async
function
(
done
)
{
try
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
StreamUsage
.
STREAM_USAGE_MUSIC
,
async
(
err
,
audioEffectInfoArray
)
=>
{
if
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
}
else
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}
});
}
catch
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
}
})
...
...
@@ -529,18 +576,26 @@ describe('AudioEffect', function () {
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0700
'
,
1
,
async
function
(
done
)
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
ContentType
.
CONTENT_TYPE_MUSIC
,
audio
.
StreamUsage
.
STREAM_USAGE_ALARM
,
async
(
err
,
audioEffectInfoArray
)
=>
{
if
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
done
();
}
else
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}
});
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0700
'
,
2
,
async
function
(
done
)
{
try
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
StreamUsage
.
STREAM_USAGE_ALARM
,
async
(
err
,
audioEffectInfoArray
)
=>
{
if
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
}
else
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}
});
}
catch
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
}
})
...
...
@@ -552,18 +607,26 @@ describe('AudioEffect', function () {
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0800
'
,
1
,
async
function
(
done
)
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
ContentType
.
CONTENT_TYPE_SPEECH
,
audio
.
StreamUsage
.
STREAM_USAGE_VOICE_ASSISTANT
,
async
(
err
,
audioEffectInfoArray
)
=>
{
if
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
done
();
}
else
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}
});
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0800
'
,
2
,
async
function
(
done
)
{
try
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
StreamUsage
.
STREAM_USAGE_VOICE_ASSISTANT
,
async
(
err
,
audioEffectInfoArray
)
=>
{
if
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
}
else
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}
});
}
catch
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
}
})
...
...
@@ -575,19 +638,207 @@ describe('AudioEffect', function () {
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0900
'
,
1
,
async
function
(
done
)
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
ContentType
.
CONTENT_TYPE_SPEECH
,
audio
.
StreamUsage
.
STREAM_USAGE_ACCESSIBILITY
,
async
(
err
,
audioEffectInfoArray
)
=>
{
if
(
err
)
{
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_0900
'
,
2
,
async
function
(
done
)
{
try
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
StreamUsage
.
STREAM_USAGE_ACCESSIBILITY
,
async
(
err
,
audioEffectInfoArray
)
=>
{
if
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
}
else
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}
});
}
catch
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
}
})
/**
* @tc.number : SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_1000
* @tc.name : GET_AUDIOEFFECTINFOARRY - VOICE_MESSAGE - Callback
* @tc.desc : GET_AUDIOEFFECTINFOARRY - VOICE_MESSAGE
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_1000
'
,
2
,
async
function
(
done
)
{
try
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
StreamUsage
.
STREAM_USAGE_VOICE_MESSAGE
,
async
(
err
,
audioEffectInfoArray
)
=>
{
if
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
}
else
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}
});
}
catch
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
}
})
/**
* @tc.number : SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_1100
* @tc.name : GET_AUDIOEFFECTINFOARRY - RINGTONE - Callback
* @tc.desc : GET_AUDIOEFFECTINFOARRY - RINGTONE
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_1100
'
,
2
,
async
function
(
done
)
{
try
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
StreamUsage
.
STREAM_USAGE_RINGTONE
,
async
(
err
,
audioEffectInfoArray
)
=>
{
if
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
}
else
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}
});
}
catch
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
}
})
/**
* @tc.number : SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_1200
* @tc.name : GET_AUDIOEFFECTINFOARRY - NOTIFICATION - Callback
* @tc.desc : GET_AUDIOEFFECTINFOARRY - NOTIFICATION
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_1200
'
,
2
,
async
function
(
done
)
{
try
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
StreamUsage
.
STREAM_USAGE_NOTIFICATION
,
async
(
err
,
audioEffectInfoArray
)
=>
{
if
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
}
else
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}
});
}
catch
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
}
})
/**
* @tc.number : SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_1300
* @tc.name : GET_AUDIOEFFECTINFOARRY - GAME - Callback
* @tc.desc : GET_AUDIOEFFECTINFOARRY - GAME
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_1300
'
,
2
,
async
function
(
done
)
{
try
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
StreamUsage
.
STREAM_USAGE_GAME
,
async
(
err
,
audioEffectInfoArray
)
=>
{
if
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
}
else
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}
});
}
catch
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
}
})
/**
* @tc.number : SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_1400
* @tc.name : GET_AUDIOEFFECTINFOARRY - AUDIOBOOK - Promise
* @tc.desc : GET_AUDIOEFFECTINFOARRY - AUDIOBOOK
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_1400
'
,
2
,
async
function
(
done
)
{
try
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
StreamUsage
.
STREAM_USAGE_AUDIOBOOK
).
then
((
audioEffectInfoArray
)
=>
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
}
else
{
});
}
catch
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
}
})
/**
* @tc.number : SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_1500
* @tc.name : GET_AUDIOEFFECTINFOARRY - NAVIGATION - Promise
* @tc.desc : GET_AUDIOEFFECTINFOARRY - NAVIGATION
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_GET_AUDIOEFFECTINFOARRY_1500
'
,
2
,
async
function
(
done
)
{
try
{
audioStreamManager
.
getAudioEffectInfoArray
(
audio
.
StreamUsage
.
STREAM_USAGE_NAVIGATION
).
then
((
audioEffectInfoArray
)
=>
{
expect
(
audioEffectInfoArray
[
0
]).
assertEqual
(
0
);
expect
(
audioEffectInfoArray
[
1
]).
assertEqual
(
1
);
console
.
log
(
`
${
TAG
}
getAudioEffectInfoArray success:
${
JSON
.
stringify
(
audioEffectInfoArray
)}
`
);
done
();
}
});
}).
catch
((
err
)
=>
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
});
}
catch
(
err
)
{
console
.
error
(
`
${
TAG
}
getAudioEffectInfoArray :ERROR:
${
err
}
`
);
expect
(
false
).
asserttrue
();
done
();
}
})
...
...
鸿蒙社区
@harmonycommunity
mentioned in commit
4a8417bb
·
7月 30, 2023
mentioned in commit
4a8417bb
mentioned in commit 4a8417bbe69c5898501a00db2131c2cb58b0bd26
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录