Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
0a2a6f9c
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看板
未验证
提交
0a2a6f9c
编写于
8月 05, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 05, 2022
浏览文件
操作
浏览文件
下载
差异文件
!4818 audioXTS整改
Merge pull request !4818 from liuxueqi/OpenHarmony-3.1-Release
上级
c82ae822
b066713e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
744 addition
and
825 deletion
+744
-825
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioCapturer.test.js
...ndard/audioManager/src/main/js/test/AudioCapturer.test.js
+15
-3
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioFramework.test.js
...dard/audioManager/src/main/js/test/AudioFramework.test.js
+7
-7
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioRenderer.test.js
...ndard/audioManager/src/main/js/test/AudioRenderer.test.js
+722
-815
未找到文件。
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioCapturer.test.js
浏览文件 @
0a2a6f9c
...
@@ -78,14 +78,26 @@ describe('audioCapturer', function () {
...
@@ -78,14 +78,26 @@ describe('audioCapturer', function () {
console
.
info
(
'
AudioFrameworkRecLog: Promise : Audio Recording Function
'
);
console
.
info
(
'
AudioFrameworkRecLog: Promise : Audio Recording Function
'
);
var
audioCap
;
var
audioCap
;
let
isPass
=
false
;
await
audio
.
createAudioCapturer
(
AudioCapturerOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioCapturer
(
AudioCapturerOptions
).
then
(
async
function
(
data
)
{
audioCap
=
data
;
audioCap
=
data
;
console
.
info
(
'
AudioFrameworkRecLog: AudioCapturer Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRecLog: AudioCapturer Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRecLog: AudioCapturer Created : ERROR :
'
+
err
.
message
);
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
;
return
resultFlag
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
return
resultFlag
;
}
console
.
info
(
'
AudioFrameworkRecLog: AudioCapturer : Path :
'
+
fpath
);
console
.
info
(
'
AudioFrameworkRecLog: AudioCapturer : Path :
'
+
fpath
);
...
@@ -5657,7 +5669,7 @@ describe('audioCapturer', function () {
...
@@ -5657,7 +5669,7 @@ describe('audioCapturer', function () {
});
});
await
sleep
(
1000
);
await
sleep
(
1000
);
audioCapCallBack
.
on
(
'
periodReach
'
,
1000
,
(
position
)
=>
{
audioCapCallBack
.
on
(
'
periodReach
'
,
1000
,
(
position
)
=>
{
if
(
position
==
"
1000
"
)
{
if
(
position
==
1000
)
{
console
.
info
(
'
AudioFrameworkRecLog: ---------ON TRIGGERED SUCCESSFULLY---------
'
);
console
.
info
(
'
AudioFrameworkRecLog: ---------ON TRIGGERED SUCCESSFULLY---------
'
);
console
.
info
(
'
AudioRenderLog: mark reached:
'
+
position
);
console
.
info
(
'
AudioRenderLog: mark reached:
'
+
position
);
stateFlag
=
true
;
stateFlag
=
true
;
...
@@ -5812,7 +5824,7 @@ describe('audioCapturer', function () {
...
@@ -5812,7 +5824,7 @@ describe('audioCapturer', function () {
});
});
await
sleep
(
1000
);
await
sleep
(
1000
);
audioCapCallBack
.
on
(
'
periodReach
'
,
1
,
(
position
)
=>
{
audioCapCallBack
.
on
(
'
periodReach
'
,
1
,
(
position
)
=>
{
if
(
position
==
"
1
"
)
{
if
(
position
==
1
)
{
console
.
info
(
'
AudioFrameworkRecLog: ---------ON TRIGGERED SUCCESSFULLY---------
'
);
console
.
info
(
'
AudioFrameworkRecLog: ---------ON TRIGGERED SUCCESSFULLY---------
'
);
console
.
info
(
'
AudioRenderLog: mark reached:
'
+
position
);
console
.
info
(
'
AudioRenderLog: mark reached:
'
+
position
);
stateFlag
=
true
;
stateFlag
=
true
;
...
...
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioFramework.test.js
浏览文件 @
0a2a6f9c
...
@@ -4226,9 +4226,9 @@ describe('audioFramework', function () {
...
@@ -4226,9 +4226,9 @@ describe('audioFramework', function () {
* @tc.level : Level 0
* @tc.level : Level 0
*/
*/
it
(
'
SUB_AUDIO_MANAGER_InterruptActionType_001
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_InterruptActionType_001
'
,
0
,
async
function
(
done
)
{
expect
(
audio
.
InterruptActionType
.
TYPE_ACTIVATED
).
assertEqual
(
0
);
expect
(
audio
.
InterruptActionType
.
TYPE_ACTIVATED
).
assertEqual
(
0
);
await
sleep
(
50
);
await
sleep
(
50
);
done
();
done
();
})
})
/* *
/* *
...
@@ -4239,10 +4239,10 @@ describe('audioFramework', function () {
...
@@ -4239,10 +4239,10 @@ describe('audioFramework', function () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
*/
*/
it
(
'
SUB_AUDIO_MANAGER_InterruptActionType_002
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_InterruptActionType_002
'
,
0
,
async
function
(
done
)
{
expect
(
audio
.
InterruptActionType
.
TYPE_INTERRUPT
).
assertEqual
(
1
);
expect
(
audio
.
InterruptActionType
.
TYPE_INTERRUPT
).
assertEqual
(
1
);
await
sleep
(
50
);
await
sleep
(
50
);
done
();
done
();
})
})
})
})
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioRenderer.test.js
浏览文件 @
0a2a6f9c
...
@@ -85,15 +85,27 @@ describe('audioRenderer', function () {
...
@@ -85,15 +85,27 @@ describe('audioRenderer', function () {
async
function
playbackPromise
(
AudioRendererOptions
,
pathName
,
AudioScene
)
{
async
function
playbackPromise
(
AudioRendererOptions
,
pathName
,
AudioScene
)
{
var
resultFlag
=
'
new
'
;
var
resultFlag
=
'
new
'
;
console
.
info
(
'
AudioFrameworkRenderLog: Promise : Audio Playback Function
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Promise : Audio Playback Function
'
);
let
isPass
=
false
;
var
audioRen
;
var
audioRen
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
return
resultFlag
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
return
resultFlag
;
}
console
.
info
(
'
AudioFrameworkRenderLog: AudioRenderer : Path :
'
+
pathName
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRenderer : Path :
'
+
pathName
);
...
@@ -222,13 +234,26 @@ describe('audioRenderer', function () {
...
@@ -222,13 +234,26 @@ describe('audioRenderer', function () {
console
.
info
(
'
AudioFrameworkRenderLog: Promise : Audio Playback Function
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Promise : Audio Playback Function
'
);
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
return
resultFlag
;
}
console
.
info
(
'
AudioFrameworkRenderLog: AudioRenderer : STATE :
'
+
audioRen
.
state
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRenderer : STATE :
'
+
audioRen
.
state
);
...
@@ -336,13 +361,26 @@ describe('audioRenderer', function () {
...
@@ -336,13 +361,26 @@ describe('audioRenderer', function () {
console
.
info
(
'
AudioFrameworkRenderLog: Promise : Audio Playback Function
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Promise : Audio Playback Function
'
);
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
return
resultFlag
;
}
console
.
info
(
'
AudioFrameworkRenderLog: AudioRenderer : STATE :
'
+
audioRen
.
state
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRenderer : STATE :
'
+
audioRen
.
state
);
...
@@ -450,13 +488,26 @@ describe('audioRenderer', function () {
...
@@ -450,13 +488,26 @@ describe('audioRenderer', function () {
console
.
info
(
'
AudioFrameworkRenderLog: Promise : Audio Playback Function
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Promise : Audio Playback Function
'
);
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
return
resultFlag
;
}
console
.
info
(
'
AudioFrameworkRenderLog: AudioRenderer : STATE :
'
+
audioRen
.
state
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRenderer : STATE :
'
+
audioRen
.
state
);
...
@@ -560,12 +611,26 @@ describe('audioRenderer', function () {
...
@@ -560,12 +611,26 @@ describe('audioRenderer', function () {
async
function
playbackPromise_102
(
AudioRendererOptions
,
pathName
)
{
async
function
playbackPromise_102
(
AudioRendererOptions
,
pathName
)
{
var
resultFlag
=
false
;
var
resultFlag
=
false
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
return
resultFlag
;
}
audioRen
.
on
(
'
markReach
'
,
55
,
(
position
)
=>
{
audioRen
.
on
(
'
markReach
'
,
55
,
(
position
)
=>
{
console
.
log
(
'
AudioFrameworkTest: markReach Event is called :
'
+
position
);
console
.
log
(
'
AudioFrameworkTest: markReach Event is called :
'
+
position
);
resultFlag
=
true
;
resultFlag
=
true
;
...
@@ -640,12 +705,26 @@ describe('audioRenderer', function () {
...
@@ -640,12 +705,26 @@ describe('audioRenderer', function () {
async
function
playbackPromise_103
(
AudioRendererOptions
,
pathName
)
{
async
function
playbackPromise_103
(
AudioRendererOptions
,
pathName
)
{
var
resultFlag
=
false
;
var
resultFlag
=
false
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
return
resultFlag
;
}
audioRen
.
on
(
'
markReach
'
,
55
,
(
position
)
=>
{
audioRen
.
on
(
'
markReach
'
,
55
,
(
position
)
=>
{
console
.
log
(
'
AudioFrameworkTest: markReach Event is called :
'
+
position
);
console
.
log
(
'
AudioFrameworkTest: markReach Event is called :
'
+
position
);
audioRen
.
off
(
'
markReach
'
);
audioRen
.
off
(
'
markReach
'
);
...
@@ -721,12 +800,26 @@ describe('audioRenderer', function () {
...
@@ -721,12 +800,26 @@ describe('audioRenderer', function () {
async
function
playbackPromise_104
(
AudioRendererOptions
,
pathName
)
{
async
function
playbackPromise_104
(
AudioRendererOptions
,
pathName
)
{
var
resultFlag
=
false
;
var
resultFlag
=
false
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
return
resultFlag
;
}
audioRen
.
on
(
'
markReach
'
,
55
,
(
position
)
=>
{
audioRen
.
on
(
'
markReach
'
,
55
,
(
position
)
=>
{
console
.
log
(
'
AudioFrameworkTest: markReach Event is called :
'
+
position
);
console
.
log
(
'
AudioFrameworkTest: markReach Event is called :
'
+
position
);
resultFlag
=
true
;
resultFlag
=
true
;
...
@@ -802,12 +895,26 @@ describe('audioRenderer', function () {
...
@@ -802,12 +895,26 @@ describe('audioRenderer', function () {
async
function
playbackPromise_105
(
AudioRendererOptions
,
pathName
)
{
async
function
playbackPromise_105
(
AudioRendererOptions
,
pathName
)
{
var
resultFlag
=
false
;
var
resultFlag
=
false
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
return
resultFlag
;
}
audioRen
.
on
(
'
periodReach
'
,
55
,
(
position
)
=>
{
audioRen
.
on
(
'
periodReach
'
,
55
,
(
position
)
=>
{
console
.
log
(
'
AudioFrameworkTest: periodReach Event is called :
'
+
position
);
console
.
log
(
'
AudioFrameworkTest: periodReach Event is called :
'
+
position
);
resultFlag
=
true
;
resultFlag
=
true
;
...
@@ -880,12 +987,26 @@ describe('audioRenderer', function () {
...
@@ -880,12 +987,26 @@ describe('audioRenderer', function () {
async
function
playbackPromise_106
(
AudioRendererOptions
,
pathName
)
{
async
function
playbackPromise_106
(
AudioRendererOptions
,
pathName
)
{
var
resultFlag
=
false
;
var
resultFlag
=
false
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
return
resultFlag
;
}
audioRen
.
on
(
'
periodReach
'
,
55
,
(
position
)
=>
{
audioRen
.
on
(
'
periodReach
'
,
55
,
(
position
)
=>
{
console
.
log
(
'
AudioFrameworkTest: periodReach Event is called :
'
+
position
);
console
.
log
(
'
AudioFrameworkTest: periodReach Event is called :
'
+
position
);
// resultFlag = true;
// resultFlag = true;
...
@@ -964,12 +1085,26 @@ describe('audioRenderer', function () {
...
@@ -964,12 +1085,26 @@ describe('audioRenderer', function () {
async
function
playbackPromise_107
(
AudioRendererOptions
,
pathName
)
{
async
function
playbackPromise_107
(
AudioRendererOptions
,
pathName
)
{
var
resultFlag
=
false
;
var
resultFlag
=
false
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
return
resultFlag
;
}
audioRen
.
on
(
'
periodReach
'
,
55
,
(
position
)
=>
{
audioRen
.
on
(
'
periodReach
'
,
55
,
(
position
)
=>
{
console
.
log
(
'
AudioFrameworkTest: periodReach Event is called :
'
+
position
);
console
.
log
(
'
AudioFrameworkTest: periodReach Event is called :
'
+
position
);
resultFlag
=
true
;
resultFlag
=
true
;
...
@@ -3178,317 +3313,7 @@ describe('audioRenderer', function () {
...
@@ -3178,317 +3313,7 @@ describe('audioRenderer', function () {
})
})
// /* *
// * @tc.number : SUB_AUDIO_RENDERER_Play_audio_036
// * @tc.name : AudioRenderer-isStreamActive - UNKNOWN - VOICE_ASSISTANT
// * @tc.desc : AudioRenderer-isStreamActive - UNKNOWN - VOICE_ASSISTANT
// * @tc.size : MEDIUM
// * @tc.type : Function
// * @tc.level : Level 0
// */
// it('SUB_AUDIO_RENDERER_Play_audio_036', 0,async function (done) {
// var AudioStreamInfo = {
// samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_48000,
// channels: audio.AudioChannel.CHANNEL_2,
// sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S32LE,
// encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW
// }
// var AudioRendererInfo = {
// content: audio.ContentType.CONTENT_TYPE_UNKNOWN,
// usage: audio.StreamUsage.STREAM_USAGE_VOICE_ASSISTANT,
// rendererFlags: 0
// }
// var AudioRendererOptions = {
// streamInfo: AudioStreamInfo,
// rendererInfo: AudioRendererInfo
// }
// var resultFlag=false;
// playbackPromise(AudioRendererOptions, mediaDir+'/StarWars10s-2C-48000-4SW.wav', audio.AudioScene.AUDIO_SCENE_DEFAULT);
// await sleep(2000);
// audioManager.isActive(audio.AudioVolumeType.MEDIA).then(function (data) {
// if(data == true){
// console.log('AudioFrameworkTest: Promise : isActive Media: PASS :'+data);
// resultFlag = true;
// }
// else {
// console.log('AudioFrameworkTest: Promise : isActive Media: FAIL :'+data);
// }
// });
// await sleep(9000);
// console.info('AudioFrameworkRenderLog: resultFlag : '+resultFlag);
// expect(resultFlag).assertTrue();
// done();
// })
// /* *
// * @tc.number : SUB_AUDIO_RENDERER_Play_audio_037
// * @tc.name : AudioRenderer-isStreamActive - SPEECH - VOICE_ASSISTANT
// * @tc.desc : AudioRenderer-isStreamActive - SPEECH - VOICE_ASSISTANT
// * @tc.size : MEDIUM
// * @tc.type : Function
// * @tc.level : Level 0
// */
// it('SUB_AUDIO_RENDERER_Play_audio_037', 0,async function (done) {
// var AudioStreamInfo = {
// samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_48000,
// channels: audio.AudioChannel.CHANNEL_2,
// sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S32LE,
// encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW
// }
// var AudioRendererInfo = {
// content: audio.ContentType.CONTENT_TYPE_SPEECH,
// usage: audio.StreamUsage.STREAM_USAGE_VOICE_ASSISTANT,
// rendererFlags: 0
// }
// var AudioRendererOptions = {
// streamInfo: AudioStreamInfo,
// rendererInfo: AudioRendererInfo
// }
// var resultFlag=false;
// playbackPromise(AudioRendererOptions, mediaDir+'/StarWars10s-2C-48000-4SW.wav', audio.AudioScene.AUDIO_SCENE_DEFAULT);
// await sleep(2000);
// audioManager.isActive(audio.AudioVolumeType.VOICE_ASSISTANT).then(function (data) {
// if(data == true){
// console.log('AudioFrameworkTest: Promise : isActive VOICE_ASSISTANT: PASS :'+data);
// resultFlag = true;
// }
// else {
// console.log('AudioFrameworkTest: Promise : isActive VOICE_ASSISTANT: FAIL :'+data);
// }
// });
// await sleep(9000);
// console.info('AudioFrameworkRenderLog: resultFlag : '+resultFlag);
// expect(resultFlag).assertTrue();
// done();
// })
// /* *
// * @tc.number : SUB_AUDIO_RENDERER_Play_audio_038
// * @tc.name : AudioRenderer-isStreamActive - MUSIC - VOICE_ASSISTANT
// * @tc.desc : AudioRenderer-isStreamActive - MUSIC - VOICE_ASSISTANT
// * @tc.size : MEDIUM
// * @tc.type : Function
// * @tc.level : Level 0
// */
// it('SUB_AUDIO_RENDERER_Play_audio_038', 0,async function (done) {
// var AudioStreamInfo = {
// samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_48000,
// channels: audio.AudioChannel.CHANNEL_2,
// sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S32LE,
// encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW
// }
// var AudioRendererInfo = {
// content: audio.ContentType.CONTENT_TYPE_MUSIC,
// usage: audio.StreamUsage.STREAM_USAGE_VOICE_ASSISTANT,
// rendererFlags: 0
// }
// var AudioRendererOptions = {
// streamInfo: AudioStreamInfo,
// rendererInfo: AudioRendererInfo
// }
// var resultFlag=false;
// playbackPromise(AudioRendererOptions, mediaDir+'/StarWars10s-2C-48000-4SW.wav', audio.AudioScene.AUDIO_SCENE_DEFAULT);
// await sleep(2000);
// audioManager.isActive(audio.AudioVolumeType.VOICE_ASSISTANT).then(function (data) {
// if(data == true){
// console.log('AudioFrameworkTest: Promise : isActive VOICE_ASSISTANT: PASS :'+data);
// resultFlag = true;
// }
// else {
// console.log('AudioFrameworkTest: Promise : isActive VOICE_ASSISTANT: FAIL :'+data);
// }
// });
// await sleep(9000);
// console.info('AudioFrameworkRenderLog: resultFlag : '+resultFlag);
// expect(resultFlag).assertTrue();
// done();
// })
// /* *
// * @tc.number : SUB_AUDIO_RENDERER_Play_audio_039
// * @tc.name : AudioRenderer-isStreamActive - MOVIE - VOICE_ASSISTANT
// * @tc.desc : AudioRenderer-isStreamActive - MOVIE - VOICE_ASSISTANT
// * @tc.size : MEDIUM
// * @tc.type : Function
// * @tc.level : Level 0
// */
// it('SUB_AUDIO_RENDERER_Play_audio_039', 0,async function (done) {
// var AudioStreamInfo = {
// samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_48000,
// channels: audio.AudioChannel.CHANNEL_2,
// sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S32LE,
// encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW
// }
// var AudioRendererInfo = {
// content: audio.ContentType.CONTENT_TYPE_MOVIE,
// usage: audio.StreamUsage.STREAM_USAGE_VOICE_ASSISTANT,
// rendererFlags: 0
// }
// var AudioRendererOptions = {
// streamInfo: AudioStreamInfo,
// rendererInfo: AudioRendererInfo
// }
// var resultFlag=false;
// playbackPromise(AudioRendererOptions, mediaDir+'/StarWars10s-2C-48000-4SW.wav', audio.AudioScene.AUDIO_SCENE_DEFAULT);
// await sleep(2000);
// audioManager.isActive(audio.AudioVolumeType.MEDIA).then(function (data) {
// if(data == true){
// console.log('AudioFrameworkTest: Promise : isActive Media: PASS :'+data);
// resultFlag = true;
// }
// else {
// console.log('AudioFrameworkTest: Promise : isActive Media: FAIL :'+data);
// }
// });
// await sleep(9000);
// console.info('AudioFrameworkRenderLog: resultFlag : '+resultFlag);
// expect(resultFlag).assertTrue();
// done();
// })
// /* *
// * @tc.number : SUB_AUDIO_RENDERER_Play_audio_040
// * @tc.name : AudioRenderer-isStreamActive - SONOTIFICATION - VOICE_ASSISTANT
// * @tc.desc : AudioRenderer-isStreamActive - SONOTIFICATION - VOICE_ASSISTANT
// * @tc.size : MEDIUM
// * @tc.type : Function
// * @tc.level : Level 0
// */
// it('SUB_AUDIO_RENDERER_Play_audio_040', 0,async function (done) {
// var AudioStreamInfo = {
// samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_48000,
// channels: audio.AudioChannel.CHANNEL_2,
// sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S32LE,
// encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW
// }
// var AudioRendererInfo = {
// content: audio.ContentType.CONTENT_TYPE_SONIFICATION,
// usage: audio.StreamUsage.STREAM_USAGE_VOICE_ASSISTANT,
// rendererFlags: 0
// }
// var AudioRendererOptions = {
// streamInfo: AudioStreamInfo,
// rendererInfo: AudioRendererInfo
// }
// var resultFlag=false;
// playbackPromise(AudioRendererOptions, mediaDir+'/StarWars10s-2C-48000-4SW.wav', audio.AudioScene.AUDIO_SCENE_DEFAULT);
// await sleep(2000);
// audioManager.isActive(audio.AudioVolumeType.MEDIA).then(function (data) {
// if(data == true){
// console.log('AudioFrameworkTest: Promise : isActive MEDIA: PASS :'+data);
// resultFlag = true;
// }
// else {
// console.log('AudioFrameworkTest: Promise : isActive MEDIA: FAIL :'+data);
// }
// });
// await sleep(9000);
// console.info('AudioFrameworkRenderLog: resultFlag : '+resultFlag);
// expect(resultFlag).assertTrue();
// done();
// })
// /* *
// * @tc.number : SUB_AUDIO_RENDERER_Play_audio_041
// * @tc.name : AudioRenderer-isStreamActive - RINGTONE - VOICE_ASSISTANT
// * @tc.desc : AudioRenderer-isStreamActive - RINGTONE - VOICE_ASSISTANT
// * @tc.size : MEDIUM
// * @tc.type : Function
// * @tc.level : Level 0
// */
// it('SUB_AUDIO_RENDERER_Play_audio_041', 0,async function (done) {
// var AudioStreamInfo = {
// samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_48000,
// channels: audio.AudioChannel.CHANNEL_2,
// sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S32LE,
// encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW
// }
// var AudioRendererInfo = {
// content: audio.ContentType.CONTENT_TYPE_RINGTONE,
// usage: audio.StreamUsage.STREAM_USAGE_VOICE_ASSISTANT,
// rendererFlags: 0
// }
// var AudioRendererOptions = {
// streamInfo: AudioStreamInfo,
// rendererInfo: AudioRendererInfo
// }
// var resultFlag=false;
// playbackPromise(AudioRendererOptions, mediaDir+'/StarWars10s-2C-48000-4SW.wav', audio.AudioScene.AUDIO_SCENE_DEFAULT);
// await sleep(2000);
// audioManager.isActive(audio.AudioVolumeType.MEDIA).then(function (data) {
// if(data == true){
// console.log('AudioFrameworkTest: Promise : isActive MEDIA: PASS :'+data);
// resultFlag = true;
// }
// else {
// console.log('AudioFrameworkTest: Promise : isActive MEDIA: FAIL :'+data);
// }
// });
// await sleep(9000);
// console.info('AudioFrameworkRenderLog: resultFlag : '+resultFlag);
// expect(resultFlag).assertTrue();
// done();
// })
/* *
/* *
* @tc.number : SUB_AUDIO_RENDERER_Play_audio_042
* @tc.number : SUB_AUDIO_RENDERER_Play_audio_042
...
@@ -3520,13 +3345,28 @@ describe('audioRenderer', function () {
...
@@ -3520,13 +3345,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -3593,13 +3433,28 @@ describe('audioRenderer', function () {
...
@@ -3593,13 +3433,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -3668,13 +3523,28 @@ describe('audioRenderer', function () {
...
@@ -3668,13 +3523,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -3743,13 +3613,28 @@ describe('audioRenderer', function () {
...
@@ -3743,13 +3613,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -3818,13 +3703,28 @@ describe('audioRenderer', function () {
...
@@ -3818,13 +3703,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -3893,13 +3793,28 @@ describe('audioRenderer', function () {
...
@@ -3893,13 +3793,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -3968,13 +3883,28 @@ describe('audioRenderer', function () {
...
@@ -3968,13 +3883,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -4043,13 +3973,28 @@ describe('audioRenderer', function () {
...
@@ -4043,13 +3973,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -4118,13 +4063,28 @@ describe('audioRenderer', function () {
...
@@ -4118,13 +4063,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -4193,13 +4153,28 @@ describe('audioRenderer', function () {
...
@@ -4193,13 +4153,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -4268,13 +4243,28 @@ describe('audioRenderer', function () {
...
@@ -4268,13 +4243,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -4343,13 +4333,28 @@ describe('audioRenderer', function () {
...
@@ -4343,13 +4333,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -4418,13 +4423,28 @@ describe('audioRenderer', function () {
...
@@ -4418,13 +4423,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -4493,13 +4513,28 @@ describe('audioRenderer', function () {
...
@@ -4493,13 +4513,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -4568,13 +4603,28 @@ describe('audioRenderer', function () {
...
@@ -4568,13 +4603,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -4643,13 +4693,28 @@ describe('audioRenderer', function () {
...
@@ -4643,13 +4693,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -4718,13 +4783,28 @@ describe('audioRenderer', function () {
...
@@ -4718,13 +4783,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -4793,13 +4873,28 @@ describe('audioRenderer', function () {
...
@@ -4793,13 +4873,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -4868,13 +4963,28 @@ describe('audioRenderer', function () {
...
@@ -4868,13 +4963,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -4943,13 +5053,28 @@ describe('audioRenderer', function () {
...
@@ -4943,13 +5053,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -5018,13 +5143,28 @@ describe('audioRenderer', function () {
...
@@ -5018,13 +5143,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -5093,13 +5233,28 @@ describe('audioRenderer', function () {
...
@@ -5093,13 +5233,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -5168,13 +5323,28 @@ describe('audioRenderer', function () {
...
@@ -5168,13 +5323,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -5243,13 +5413,28 @@ describe('audioRenderer', function () {
...
@@ -5243,13 +5413,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
await
audioRen
.
getRendererInfo
().
then
(
async
function
(
audioParamsGet
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Renderer RendererInfo:
'
);
...
@@ -5288,509 +5473,6 @@ describe('audioRenderer', function () {
...
@@ -5288,509 +5473,6 @@ describe('audioRenderer', function () {
})
})
// /* *
// * @tc.number : SUB_AUDIO_RENDERER_Play_audio_066
// * @tc.name : AudioRenderer-SET & GET AudioRendererInfo - Set25
// * @tc.desc : AudioRenderer-SET & GET AudioRendererInfo - Set25
// * @tc.size : MEDIUM
// * @tc.type : Function
// * @tc.level : Level 0
// */
// it('SUB_AUDIO_RENDERER_Play_audio_066', 0,async function (done) {
// var AudioStreamInfo = {
// samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_48000,
// channels: audio.AudioChannel.CHANNEL_2,
// sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S32LE,
// encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW
// }
// var AudioRendererInfo = {
// content: audio.ContentType.CONTENT_TYPE_UNKNOWN,
// usage: audio.StreamUsage.STREAM_USAGE_VOICE_ASSISTANT,
// rendererFlags: 0
// }
// var AudioRendererOptions = {
// streamInfo: AudioStreamInfo,
// rendererInfo: AudioRendererInfo
// }
// var resultFlag=true;
// var audioRen;
// await audio.createAudioRenderer(AudioRendererOptions).then(async function (data) {
// audioRen = data;
// console.info('AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS');
// }).catch((err) => {
// console.info('AudioFrameworkRenderLog: AudioRender Created : ERROR : '+err.message);
// resultFlag = false;
// });
// await audioRen.getRendererInfo().then(async function (audioParamsGet) {
// console.info('AudioFrameworkRenderLog: Renderer RendererInfo:');
// console.info('AudioFrameworkRenderLog: Renderer content type:' + audioParamsGet.content);
// console.info('AudioFrameworkRenderLog: Renderer usage:' + audioParamsGet.usage);
// console.info('AudioFrameworkRenderLog: Renderer rendererFlags:' + audioParamsGet.rendererFlags);
// if (audioParamsGet.content == AudioRendererInfo.content){
// console.info('AudioFrameworkRenderLog: Renderer content type: PASS: ' + audioParamsGet.content);
// }
// else{
// console.info('AudioFrameworkRenderLog: Renderer content type: FAIL: ' + audioParamsGet.content);
// resultFlag = false;
// }
// if (audioParamsGet.usage == AudioRendererInfo.usage){
// console.info('AudioFrameworkRenderLog: Renderer usage type: PASS: ' + audioParamsGet.usage);
// }
// else{
// console.info('AudioFrameworkRenderLog: Renderer usage type: FAIL: ' + audioParamsGet.usage);
// resultFlag = false;
// }
// if (audioParamsGet.rendererFlags == AudioRendererInfo.rendererFlags){
// console.info('AudioFrameworkRenderLog: Renderer usage type: PASS: ' + audioParamsGet.rendererFlags);
// }
// else{
// console.info('AudioFrameworkRenderLog: Renderer usage type: FAIL: ' + audioParamsGet.rendererFlags);
// resultFlag = false;
// }
// }).catch((err) => {
// console.log('AudioFrameworkRenderLog: RendererInfo :ERROR: '+err.message);
// resultFlag = false;
// });
// expect(resultFlag).assertTrue();
// done();
// })
// /* *
// * @tc.number : SUB_AUDIO_RENDERER_Play_audio_067
// * @tc.name : AudioRenderer-SET & GET AudioRendererInfo - Set26
// * @tc.desc : AudioRenderer-SET & GET AudioRendererInfo - Set26
// * @tc.size : MEDIUM
// * @tc.type : Function
// * @tc.level : Level 0
// */
// it('SUB_AUDIO_RENDERER_Play_audio_067', 0,async function (done) {
// var AudioStreamInfo = {
// samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_48000,
// channels: audio.AudioChannel.CHANNEL_2,
// sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S32LE,
// encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW
// }
// var AudioRendererInfo = {
// content: audio.ContentType.CONTENT_TYPE_SPEECH,
// usage: audio.StreamUsage.STREAM_USAGE_VOICE_ASSISTANT,
// rendererFlags: 0
// }
// var AudioRendererOptions = {
// streamInfo: AudioStreamInfo,
// rendererInfo: AudioRendererInfo
// }
// var resultFlag=true;
// var audioRen;
// await audio.createAudioRenderer(AudioRendererOptions).then(async function (data) {
// audioRen = data;
// console.info('AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS');
// }).catch((err) => {
// console.info('AudioFrameworkRenderLog: AudioRender Created : ERROR : '+err.message);
// resultFlag = false;
// });
// await audioRen.getRendererInfo().then(async function (audioParamsGet) {
// console.info('AudioFrameworkRenderLog: Renderer RendererInfo:');
// console.info('AudioFrameworkRenderLog: Renderer content type:' + audioParamsGet.content);
// console.info('AudioFrameworkRenderLog: Renderer usage:' + audioParamsGet.usage);
// console.info('AudioFrameworkRenderLog: Renderer rendererFlags:' + audioParamsGet.rendererFlags);
// if (audioParamsGet.content == AudioRendererInfo.content){
// console.info('AudioFrameworkRenderLog: Renderer content type: PASS: ' + audioParamsGet.content);
// }
// else{
// console.info('AudioFrameworkRenderLog: Renderer content type: FAIL: ' + audioParamsGet.content);
// resultFlag = false;
// }
// if (audioParamsGet.usage == AudioRendererInfo.usage){
// console.info('AudioFrameworkRenderLog: Renderer usage type: PASS: ' + audioParamsGet.usage);
// }
// else{
// console.info('AudioFrameworkRenderLog: Renderer usage type: FAIL: ' + audioParamsGet.usage);
// resultFlag = false;
// }
// if (audioParamsGet.rendererFlags == AudioRendererInfo.rendererFlags){
// console.info('AudioFrameworkRenderLog: Renderer usage type: PASS: ' + audioParamsGet.rendererFlags);
// }
// else{
// console.info('AudioFrameworkRenderLog: Renderer usage type: FAIL: ' + audioParamsGet.rendererFlags);
// resultFlag = false;
// }
// }).catch((err) => {
// console.log('AudioFrameworkRenderLog: RendererInfo :ERROR: '+err.message);
// resultFlag = false;
// });
// expect(resultFlag).assertTrue();
// done();
// })
// /* *
// * @tc.number : SUB_AUDIO_RENDERER_Play_audio_068
// * @tc.name : AudioRenderer-SET & GET AudioRendererInfo - Set27
// * @tc.desc : AudioRenderer-SET & GET AudioRendererInfo - Set27
// * @tc.size : MEDIUM
// * @tc.type : Function
// * @tc.level : Level 0
// */
// it('SUB_AUDIO_RENDERER_Play_audio_068', 0,async function (done) {
// var AudioStreamInfo = {
// samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_48000,
// channels: audio.AudioChannel.CHANNEL_2,
// sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S32LE,
// encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW
// }
// var AudioRendererInfo = {
// content: audio.ContentType.CONTENT_TYPE_MUSIC,
// usage: audio.StreamUsage.STREAM_USAGE_VOICE_ASSISTANT,
// rendererFlags: 0
// }
// var AudioRendererOptions = {
// streamInfo: AudioStreamInfo,
// rendererInfo: AudioRendererInfo
// }
// var resultFlag=true;
// var audioRen;
// await audio.createAudioRenderer(AudioRendererOptions).then(async function (data) {
// audioRen = data;
// console.info('AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS');
// }).catch((err) => {
// console.info('AudioFrameworkRenderLog: AudioRender Created : ERROR : '+err.message);
// resultFlag = false;
// });
// await audioRen.getRendererInfo().then(async function (audioParamsGet) {
// console.info('AudioFrameworkRenderLog: Renderer RendererInfo:');
// console.info('AudioFrameworkRenderLog: Renderer content type:' + audioParamsGet.content);
// console.info('AudioFrameworkRenderLog: Renderer usage:' + audioParamsGet.usage);
// console.info('AudioFrameworkRenderLog: Renderer rendererFlags:' + audioParamsGet.rendererFlags);
// if (audioParamsGet.content == AudioRendererInfo.content){
// console.info('AudioFrameworkRenderLog: Renderer content type: PASS: ' + audioParamsGet.content);
// }
// else{
// console.info('AudioFrameworkRenderLog: Renderer content type: FAIL: ' + audioParamsGet.content);
// resultFlag = false;
// }
// if (audioParamsGet.usage == AudioRendererInfo.usage){
// console.info('AudioFrameworkRenderLog: Renderer usage type: PASS: ' + audioParamsGet.usage);
// }
// else{
// console.info('AudioFrameworkRenderLog: Renderer usage type: FAIL: ' + audioParamsGet.usage);
// resultFlag = false;
// }
// if (audioParamsGet.rendererFlags == AudioRendererInfo.rendererFlags){
// console.info('AudioFrameworkRenderLog: Renderer usage type: PASS: ' + audioParamsGet.rendererFlags);
// }
// else{
// console.info('AudioFrameworkRenderLog: Renderer usage type: FAIL: ' + audioParamsGet.rendererFlags);
// resultFlag = false;
// }
// }).catch((err) => {
// console.log('AudioFrameworkRenderLog: RendererInfo :ERROR: '+err.message);
// resultFlag = false;
// });
// expect(resultFlag).assertTrue();
// done();
// })
// /* *
// * @tc.number : SUB_AUDIO_RENDERER_Play_audio_069
// * @tc.name : AudioRenderer-SET & GET AudioRendererInfo - Set28
// * @tc.desc : AudioRenderer-SET & GET AudioRendererInfo - Set28
// * @tc.size : MEDIUM
// * @tc.type : Function
// * @tc.level : Level 0
// */
// it('SUB_AUDIO_RENDERER_Play_audio_069', 0,async function (done) {
// var AudioStreamInfo = {
// samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_48000,
// channels: audio.AudioChannel.CHANNEL_2,
// sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S32LE,
// encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW
// }
// var AudioRendererInfo = {
// content: audio.ContentType.CONTENT_TYPE_MOVIE,
// usage: audio.StreamUsage.STREAM_USAGE_VOICE_ASSISTANT,
// rendererFlags: 0
// }
// var AudioRendererOptions = {
// streamInfo: AudioStreamInfo,
// rendererInfo: AudioRendererInfo
// }
// var resultFlag=true;
// var audioRen;
// await audio.createAudioRenderer(AudioRendererOptions).then(async function (data) {
// audioRen = data;
// console.info('AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS');
// }).catch((err) => {
// console.info('AudioFrameworkRenderLog: AudioRender Created : ERROR : '+err.message);
// resultFlag = false;
// });
// await audioRen.getRendererInfo().then(async function (audioParamsGet) {
// console.info('AudioFrameworkRenderLog: Renderer RendererInfo:');
// console.info('AudioFrameworkRenderLog: Renderer content type:' + audioParamsGet.content);
// console.info('AudioFrameworkRenderLog: Renderer usage:' + audioParamsGet.usage);
// console.info('AudioFrameworkRenderLog: Renderer rendererFlags:' + audioParamsGet.rendererFlags);
// if (audioParamsGet.content == AudioRendererInfo.content){
// console.info('AudioFrameworkRenderLog: Renderer content type: PASS: ' + audioParamsGet.content);
// }
// else{
// console.info('AudioFrameworkRenderLog: Renderer content type: FAIL: ' + audioParamsGet.content);
// resultFlag = false;
// }
// if (audioParamsGet.usage == AudioRendererInfo.usage){
// console.info('AudioFrameworkRenderLog: Renderer usage type: PASS: ' + audioParamsGet.usage);
// }
// else{
// console.info('AudioFrameworkRenderLog: Renderer usage type: FAIL: ' + audioParamsGet.usage);
// resultFlag = false;
// }
// if (audioParamsGet.rendererFlags == AudioRendererInfo.rendererFlags){
// console.info('AudioFrameworkRenderLog: Renderer usage type: PASS: ' + audioParamsGet.rendererFlags);
// }
// else{
// console.info('AudioFrameworkRenderLog: Renderer usage type: FAIL: ' + audioParamsGet.rendererFlags);
// resultFlag = false;
// }
// }).catch((err) => {
// console.log('AudioFrameworkRenderLog: RendererInfo :ERROR: '+err.message);
// resultFlag = false;
// });
// expect(resultFlag).assertTrue();
// done();
// })
// /* *
// * @tc.number : SUB_AUDIO_RENDERER_Play_audio_070
// * @tc.name : AudioRenderer-SET & GET AudioRendererInfo - Set29
// * @tc.desc : AudioRenderer-SET & GET AudioRendererInfo - Set29
// * @tc.size : MEDIUM
// * @tc.type : Function
// * @tc.level : Level 0
// */
// it('SUB_AUDIO_RENDERER_Play_audio_070', 0,async function (done) {
// var AudioStreamInfo = {
// samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_48000,
// channels: audio.AudioChannel.CHANNEL_2,
// sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S32LE,
// encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW
// }
// var AudioRendererInfo = {
// content: audio.ContentType.CONTENT_TYPE_SONIFICATION,
// usage: audio.StreamUsage.STREAM_USAGE_VOICE_ASSISTANT,
// rendererFlags: 0
// }
// var AudioRendererOptions = {
// streamInfo: AudioStreamInfo,
// rendererInfo: AudioRendererInfo
// }
// var resultFlag=true;
// var audioRen;
// await audio.createAudioRenderer(AudioRendererOptions).then(async function (data) {
// audioRen = data;
// console.info('AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS');
// }).catch((err) => {
// console.info('AudioFrameworkRenderLog: AudioRender Created : ERROR : '+err.message);
// resultFlag = false;
// });
// await audioRen.getRendererInfo().then(async function (audioParamsGet) {
// console.info('AudioFrameworkRenderLog: Renderer RendererInfo:');
// console.info('AudioFrameworkRenderLog: Renderer content type:' + audioParamsGet.content);
// console.info('AudioFrameworkRenderLog: Renderer usage:' + audioParamsGet.usage);
// console.info('AudioFrameworkRenderLog: Renderer rendererFlags:' + audioParamsGet.rendererFlags);
// if (audioParamsGet.content == AudioRendererInfo.content){
// console.info('AudioFrameworkRenderLog: Renderer content type: PASS: ' + audioParamsGet.content);
// }
// else{
// console.info('AudioFrameworkRenderLog: Renderer content type: FAIL: ' + audioParamsGet.content);
// resultFlag = false;
// }
// if (audioParamsGet.usage == AudioRendererInfo.usage){
// console.info('AudioFrameworkRenderLog: Renderer usage type: PASS: ' + audioParamsGet.usage);
// }
// else{
// console.info('AudioFrameworkRenderLog: Renderer usage type: FAIL: ' + audioParamsGet.usage);
// resultFlag = false;
// }
// if (audioParamsGet.rendererFlags == AudioRendererInfo.rendererFlags){
// console.info('AudioFrameworkRenderLog: Renderer usage type: PASS: ' + audioParamsGet.rendererFlags);
// }
// else{
// console.info('AudioFrameworkRenderLog: Renderer usage type: FAIL: ' + audioParamsGet.rendererFlags);
// resultFlag = false;
// }
// }).catch((err) => {
// console.log('AudioFrameworkRenderLog: RendererInfo :ERROR: '+err.message);
// resultFlag = false;
// });
// expect(resultFlag).assertTrue();
// done();
// })
// /* *
// * @tc.number : SUB_AUDIO_RENDERER_Play_audio_071
// * @tc.name : AudioRenderer-SET & GET AudioRendererInfo - Set30
// * @tc.desc : AudioRenderer-SET & GET AudioRendererInfo - Set30
// * @tc.size : MEDIUM
// * @tc.type : Function
// * @tc.level : Level 0
// */
// it('SUB_AUDIO_RENDERER_Play_audio_071', 0,async function (done) {
// var AudioStreamInfo = {
// samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_48000,
// channels: audio.AudioChannel.CHANNEL_2,
// sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S32LE,
// encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW
// }
// var AudioRendererInfo = {
// content: audio.ContentType.CONTENT_TYPE_RINGTONE,
// usage: audio.StreamUsage.STREAM_USAGE_VOICE_ASSISTANT,
// rendererFlags: 0
// }
// var AudioRendererOptions = {
// streamInfo: AudioStreamInfo,
// rendererInfo: AudioRendererInfo
// }
// var resultFlag=true;
// var audioRen;
// await audio.createAudioRenderer(AudioRendererOptions).then(async function (data) {
// audioRen = data;
// console.info('AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS');
// }).catch((err) => {
// console.info('AudioFrameworkRenderLog: AudioRender Created : ERROR : '+err.message);
// resultFlag = false;
// });
// await audioRen.getRendererInfo().then(async function (audioParamsGet) {
// console.info('AudioFrameworkRenderLog: Renderer RendererInfo:');
// console.info('AudioFrameworkRenderLog: Renderer content type:' + audioParamsGet.content);
// console.info('AudioFrameworkRenderLog: Renderer usage:' + audioParamsGet.usage);
// console.info('AudioFrameworkRenderLog: Renderer rendererFlags:' + audioParamsGet.rendererFlags);
// if (audioParamsGet.content == AudioRendererInfo.content){
// console.info('AudioFrameworkRenderLog: Renderer content type: PASS: ' + audioParamsGet.content);
// }
// else{
// console.info('AudioFrameworkRenderLog: Renderer content type: FAIL: ' + audioParamsGet.content);
// resultFlag = false;
// }
// if (audioParamsGet.usage == AudioRendererInfo.usage){
// console.info('AudioFrameworkRenderLog: Renderer usage type: PASS: ' + audioParamsGet.usage);
// }
// else{
// console.info('AudioFrameworkRenderLog: Renderer usage type: FAIL: ' + audioParamsGet.usage);
// resultFlag = false;
// }
// if (audioParamsGet.rendererFlags == AudioRendererInfo.rendererFlags){
// console.info('AudioFrameworkRenderLog: Renderer usage type: PASS: ' + audioParamsGet.rendererFlags);
// }
// else{
// console.info('AudioFrameworkRenderLog: Renderer usage type: FAIL: ' + audioParamsGet.rendererFlags);
// resultFlag = false;
// }
// }).catch((err) => {
// console.log('AudioFrameworkRenderLog: RendererInfo :ERROR: '+err.message);
// resultFlag = false;
// });
// expect(resultFlag).assertTrue();
// done();
// })
// /* *
// * @tc.number : SUB_AUDIO_RENDERER_Play_audio_072
// * @tc.name : AudioRenderer - STATE_NEW
// * @tc.desc : AudioRenderer - STATE_NEW
// * @tc.size : MEDIUM
// * @tc.type : Function
// * @tc.level : Level 0
// */
// it('SUB_AUDIO_RENDERER_Play_audio_072', 0,async function (done) {
// var AudioStreamInfo = {
// samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_48000,
// channels: audio.AudioChannel.CHANNEL_2,
// sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S32LE,
// encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW
// }
// var AudioRendererInfo = {
// content: audio.ContentType.CONTENT_TYPE_RINGTONE,
// usage: audio.StreamUsage.STREAM_USAGE_VOICE_ASSISTANT,
// rendererFlags: 0
// }
// var AudioRendererOptions = {
// streamInfo: AudioStreamInfo,
// rendererInfo: AudioRendererInfo
// }
// var resultFlag = true;
// var audioRen;
// await audio.createAudioRenderer(AudioRendererOptions).then(async function (data) {
// audioRen = data;
// console.info('AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS');
// }).catch((err) => {
// console.info('AudioFrameworkRenderLog: AudioRender Created : ERROR : '+err.message);
// resultFlag = false;
// });
// if (audioRen.state==audio.AudioState.STATE_NEW) {
// console.info('AudioFrameworkRenderLog: Audio State : STATE_NEW : PASS : ' + audioRen.state);
// }
// else {
// console.info('AudioFrameworkRenderLog: Audio State : STATE_NEW : FAIL : ' + audioRen.state);
// resultFlag = false;
// }
// await audioRen.release().then(async function () {
// console.info('AudioFrameworkRenderLog: Renderer release : SUCCESS');
// }).catch((err) => {
// console.info('AudioFrameworkRenderLog: Renderer release :ERROR : '+err.message);
// });
// expect(resultFlag).assertTrue();
// done();
// })
/* *
/* *
* @tc.number : SUB_AUDIO_RENDERER_Play_audio_073
* @tc.number : SUB_AUDIO_RENDERER_Play_audio_073
* @tc.name : AudioRenderer - STATE_PREPARED
* @tc.name : AudioRenderer - STATE_PREPARED
...
@@ -5820,13 +5502,28 @@ describe('audioRenderer', function () {
...
@@ -5820,13 +5502,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
if
(
audioRen
.
state
==
audio
.
AudioState
.
STATE_PREPARED
)
{
if
(
audioRen
.
state
==
audio
.
AudioState
.
STATE_PREPARED
)
{
console
.
info
(
'
AudioFrameworkRenderLog: Audio State : STATE_PREPARED : PASS :
'
+
audioRen
.
state
);
console
.
info
(
'
AudioFrameworkRenderLog: Audio State : STATE_PREPARED : PASS :
'
+
audioRen
.
state
);
...
@@ -5877,13 +5574,28 @@ describe('audioRenderer', function () {
...
@@ -5877,13 +5574,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
start
().
then
(
async
function
()
{
await
audioRen
.
start
().
then
(
async
function
()
{
console
.
info
(
'
AudioFrameworkRenderLog: renderInstant started :SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: renderInstant started :SUCCESS
'
);
...
@@ -5949,13 +5661,28 @@ describe('audioRenderer', function () {
...
@@ -5949,13 +5661,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
start
().
then
(
async
function
()
{
await
audioRen
.
start
().
then
(
async
function
()
{
console
.
info
(
'
AudioFrameworkRenderLog: renderInstant started :SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: renderInstant started :SUCCESS
'
);
...
@@ -6023,13 +5750,28 @@ describe('audioRenderer', function () {
...
@@ -6023,13 +5750,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
start
().
then
(
async
function
()
{
await
audioRen
.
start
().
then
(
async
function
()
{
console
.
info
(
'
AudioFrameworkRenderLog: renderInstant started :SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: renderInstant started :SUCCESS
'
);
...
@@ -6098,13 +5840,28 @@ describe('audioRenderer', function () {
...
@@ -6098,13 +5840,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
true
;
var
resultFlag
=
true
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
start
().
then
(
async
function
()
{
await
audioRen
.
start
().
then
(
async
function
()
{
console
.
info
(
'
AudioFrameworkRenderLog: renderInstant started :SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: renderInstant started :SUCCESS
'
);
...
@@ -6189,13 +5946,28 @@ describe('audioRenderer', function () {
...
@@ -6189,13 +5946,28 @@ describe('audioRenderer', function () {
console
.
info
(
'
AudioFrameworkRenderLog: Promise : Audio Playback Function
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Promise : Audio Playback Function
'
);
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
console
.
info
(
'
AudioFrameworkRenderLog: AudioRenderer : Path :
'
+
readpath
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRenderer : Path :
'
+
readpath
);
...
@@ -6353,13 +6125,28 @@ describe('audioRenderer', function () {
...
@@ -6353,13 +6125,28 @@ describe('audioRenderer', function () {
console
.
info
(
'
AudioFrameworkRenderLog: Promise : Audio Playback Function
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Promise : Audio Playback Function
'
);
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
console
.
info
(
'
AudioFrameworkRenderLog: AudioRenderer : Path :
'
+
readpath
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRenderer : Path :
'
+
readpath
);
...
@@ -6672,13 +6459,28 @@ describe('audioRenderer', function () {
...
@@ -6672,13 +6459,28 @@ describe('audioRenderer', function () {
console
.
info
(
'
AudioFrameworkRenderLog: Promise : Audio Playback Function
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Promise : Audio Playback Function
'
);
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
console
.
info
(
'
AudioFrameworkRenderLog: AudioRenderer : Path :
'
+
readpath
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRenderer : Path :
'
+
readpath
);
...
@@ -6868,13 +6670,28 @@ describe('audioRenderer', function () {
...
@@ -6868,13 +6670,28 @@ describe('audioRenderer', function () {
console
.
info
(
'
AudioFrameworkRenderLog: Promise : Audio Playback Function
'
);
console
.
info
(
'
AudioFrameworkRenderLog: Promise : Audio Playback Function
'
);
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
await
audioRen
.
getAudioTime
().
then
(
async
function
(
data
)
{
await
audioRen
.
getAudioTime
().
then
(
async
function
(
data
)
{
console
.
info
(
'
AudioFrameworkRenderLog: getAudioTime : Value :
'
+
data
);
console
.
info
(
'
AudioFrameworkRenderLog: getAudioTime : Value :
'
+
data
);
...
@@ -6937,13 +6754,28 @@ describe('audioRenderer', function () {
...
@@ -6937,13 +6754,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
false
;
var
resultFlag
=
false
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
audioRen
.
on
(
'
stateChange
'
,
(
AudioState
)
=>
{
audioRen
.
on
(
'
stateChange
'
,
(
AudioState
)
=>
{
...
@@ -7001,13 +6833,28 @@ describe('audioRenderer', function () {
...
@@ -7001,13 +6833,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
false
;
var
resultFlag
=
false
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
audioRen
.
on
(
'
stateChange
'
,
(
AudioState
)
=>
{
audioRen
.
on
(
'
stateChange
'
,
(
AudioState
)
=>
{
...
@@ -7081,13 +6928,28 @@ describe('audioRenderer', function () {
...
@@ -7081,13 +6928,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
false
;
var
resultFlag
=
false
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
audioRen
.
on
(
'
stateChange
'
,
(
AudioState
)
=>
{
audioRen
.
on
(
'
stateChange
'
,
(
AudioState
)
=>
{
...
@@ -7163,13 +7025,28 @@ describe('audioRenderer', function () {
...
@@ -7163,13 +7025,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
false
;
var
resultFlag
=
false
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
audioRen
.
on
(
'
stateChange
'
,
(
AudioState
)
=>
{
audioRen
.
on
(
'
stateChange
'
,
(
AudioState
)
=>
{
...
@@ -7245,13 +7122,28 @@ describe('audioRenderer', function () {
...
@@ -7245,13 +7122,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
false
;
var
resultFlag
=
false
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
audioRen
.
on
(
'
stateChange
'
,
(
AudioState
)
=>
{
audioRen
.
on
(
'
stateChange
'
,
(
AudioState
)
=>
{
console
.
log
(
'
AudioFrameworkTest: Volume Change Event is called
'
);
console
.
log
(
'
AudioFrameworkTest: Volume Change Event is called
'
);
...
@@ -7392,13 +7284,28 @@ describe('audioRenderer', function () {
...
@@ -7392,13 +7284,28 @@ describe('audioRenderer', function () {
var
resultFlag
=
false
;
var
resultFlag
=
false
;
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
await
audio
.
createAudioRenderer
(
AudioRendererOptions
).
then
(
async
function
(
data
)
{
audioRen
=
data
;
audioRen
=
data
;
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : Stream Type: SUCCESS
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : ERROR :
'
+
err
.
message
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender 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
;
}
resultFlag
=
false
;
resultFlag
=
false
;
});
});
console
.
log
(
"
isPass:
"
+
isPass
);
if
(
isPass
)
{
resultFlag
=
true
;
expect
(
resultFlag
).
assertTrue
();
done
();
return
;
}
audioRen
.
on
(
'
stateChange
'
,
(
AudioState
)
=>
{
audioRen
.
on
(
'
stateChange
'
,
(
AudioState
)
=>
{
console
.
log
(
'
AudioFrameworkTest: Volume Change Event is called
'
);
console
.
log
(
'
AudioFrameworkTest: Volume Change Event is called
'
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录