Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
2e083012
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看板
提交
2e083012
编写于
12月 14, 2022
作者:
Q
qinliwen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
<audio xts整改>
Signed-off-by:
N
qinliwen
<
qinliwen3@huawei.com
>
上级
489fe22c
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
20 addition
and
8 deletion
+20
-8
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioRenderer.test.js
...ndard/audioManager/src/main/js/test/AudioRenderer.test.js
+20
-8
未找到文件。
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioRenderer.test.js
浏览文件 @
2e083012
...
@@ -1313,17 +1313,29 @@ describe('audioRenderer', function () {
...
@@ -1313,17 +1313,29 @@ describe('audioRenderer', function () {
console
.
info
(
'
AudioFrameworkRenderLog: CALLBACK : Audio Playback Function
'
);
console
.
info
(
'
AudioFrameworkRenderLog: CALLBACK : Audio Playback Function
'
);
var
audioRen
;
var
audioRen
;
let
isPass
=
false
;
audio
.
createAudioRenderer
(
AudioRendererOptions
,
(
err
,
data
)
=>
{
audio
.
createAudioRenderer
(
AudioRendererOptions
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkRenderLog: AudioRender Created : Error:
${
err
.
message
}
`
);
LE24
=
audio
.
AudioSampleFormat
.
SAMPLE_FORMAT_S24LE
;
resultFlag
=
false
;
LE32
=
audio
.
AudioSampleFormat
.
SAMPLE_FORMAT_S32LE
;
let
sampleFormat
=
AudioRendererOptions
.
streamInfo
.
sampleFormat
;
if
((
sampleFormat
==
LE24
||
sampleFormat
==
LE32
)
&&
err
.
code
==
202
)
{
isPass
=
true
;
return
;
}
resultFlag
=
false
}
}
else
{
else
{
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : SUCCESS
'
);
console
.
info
(
'
AudioFrameworkRenderLog: AudioRender Created : Success : SUCCESS
'
);
audioRen
=
data
;
audioRen
=
data
;
}
}
});
});
console
.
log
(
`isPass:
${
isPass
}
`
);
if
(
isPass
)
{
resultFlag
=
true
;
return
resultFlag
;
}
if
(
resultFlag
==
false
)
{
if
(
resultFlag
==
false
)
{
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
return
resultFlag
;
return
resultFlag
;
...
@@ -7388,7 +7400,7 @@ describe('audioRenderer', function () {
...
@@ -7388,7 +7400,7 @@ describe('audioRenderer', function () {
var
AudioStreamInfo
=
{
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_48000
,
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_48000
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
sampleFormat
:
audio
.
AudioSampleFormat
.
SAMPLE_FORMAT_S
16
LE
,
sampleFormat
:
audio
.
AudioSampleFormat
.
SAMPLE_FORMAT_S
32
LE
,
encodingType
:
audio
.
AudioEncodingType
.
ENCODING_TYPE_RAW
encodingType
:
audio
.
AudioEncodingType
.
ENCODING_TYPE_RAW
}
}
...
@@ -7537,7 +7549,7 @@ describe('audioRenderer', function () {
...
@@ -7537,7 +7549,7 @@ describe('audioRenderer', function () {
var
AudioStreamInfo
=
{
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_64000
,
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_64000
,
channels
:
audio
.
AudioChannel
.
CHANNEL_1
,
channels
:
audio
.
AudioChannel
.
CHANNEL_1
,
sampleFormat
:
audio
.
AudioSampleFormat
.
SAMPLE_FORMAT_S
16
LE
,
sampleFormat
:
audio
.
AudioSampleFormat
.
SAMPLE_FORMAT_S
24
LE
,
encodingType
:
audio
.
AudioEncodingType
.
ENCODING_TYPE_RAW
encodingType
:
audio
.
AudioEncodingType
.
ENCODING_TYPE_RAW
}
}
...
@@ -7574,7 +7586,7 @@ describe('audioRenderer', function () {
...
@@ -7574,7 +7586,7 @@ describe('audioRenderer', function () {
var
AudioStreamInfo
=
{
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_96000
,
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_96000
,
channels
:
audio
.
AudioChannel
.
CHANNEL_1
,
channels
:
audio
.
AudioChannel
.
CHANNEL_1
,
sampleFormat
:
audio
.
AudioSampleFormat
.
SAMPLE_FORMAT_S
16
LE
,
sampleFormat
:
audio
.
AudioSampleFormat
.
SAMPLE_FORMAT_S
32
LE
,
encodingType
:
audio
.
AudioEncodingType
.
ENCODING_TYPE_RAW
encodingType
:
audio
.
AudioEncodingType
.
ENCODING_TYPE_RAW
}
}
...
@@ -7685,7 +7697,7 @@ describe('audioRenderer', function () {
...
@@ -7685,7 +7697,7 @@ describe('audioRenderer', function () {
var
AudioStreamInfo
=
{
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_16000
,
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_16000
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
sampleFormat
:
audio
.
AudioSampleFormat
.
SAMPLE_FORMAT_S
16
LE
,
sampleFormat
:
audio
.
AudioSampleFormat
.
SAMPLE_FORMAT_S
24
LE
,
encodingType
:
audio
.
AudioEncodingType
.
ENCODING_TYPE_RAW
encodingType
:
audio
.
AudioEncodingType
.
ENCODING_TYPE_RAW
}
}
...
@@ -7762,7 +7774,7 @@ describe('audioRenderer', function () {
...
@@ -7762,7 +7774,7 @@ describe('audioRenderer', function () {
var
AudioStreamInfo
=
{
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_24000
,
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_24000
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
sampleFormat
:
audio
.
AudioSampleFormat
.
SAMPLE_FORMAT_S
16
LE
,
sampleFormat
:
audio
.
AudioSampleFormat
.
SAMPLE_FORMAT_S
24
LE
,
encodingType
:
audio
.
AudioEncodingType
.
ENCODING_TYPE_RAW
encodingType
:
audio
.
AudioEncodingType
.
ENCODING_TYPE_RAW
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录