Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
700912a3
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看板
未验证
提交
700912a3
编写于
4月 21, 2023
作者:
O
openharmony_ci
提交者:
Gitee
4月 21, 2023
浏览文件
操作
浏览文件
下载
差异文件
!8484 修改build.gn错误,修改validator音频播放bug
Merge pull request !8484 from 秦莉文/master
上级
b63a6918
17c25cf5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
7 addition
and
4 deletion
+7
-4
multimedia/media/media_js_standard/avPlayer/BUILD.gn
multimedia/media/media_js_standard/avPlayer/BUILD.gn
+2
-2
validator/acts_validator/src/main/ets/pages/model/AudioRenderer.ts
.../acts_validator/src/main/ets/pages/model/AudioRenderer.ts
+5
-2
未找到文件。
multimedia/media/media_js_standard/avPlayer/BUILD.gn
浏览文件 @
700912a3
...
...
@@ -23,8 +23,8 @@ ohos_js_hap_suite("avplayer_js_hap") {
ets2abc = true
certificate_profile = "signature/openharmony_sx.p7b"
hap_name = "ActsAVPlayerTest"
subsystem_name = "
ability
"
part_name = "
ability_runtime
"
subsystem_name = "
multimedia
"
part_name = "
multimedia_player_framework
"
}
ohos_app_scope("ActsAVPlayerTest_app_profile") {
...
...
validator/acts_validator/src/main/ets/pages/model/AudioRenderer.ts
浏览文件 @
700912a3
...
...
@@ -11,6 +11,7 @@ class AudioRenderer {
private
audioRenderer
:
audio
.
AudioRenderer
=
undefined
private
fd
:
number
=
undefined
private
offset
:
number
=
undefined
private
length
:
number
=
undefined
async
createAudioRenderer
(){
let
audioStreamInfo
=
{
...
...
@@ -46,6 +47,7 @@ class AudioRenderer {
globalThis
.
abilityContext
.
resourceManager
.
getRawFd
(
"
test_44100_2.wav
"
).
then
(
value
=>
{
this
.
fd
=
value
.
fd
this
.
offset
=
value
.
offset
this
.
length
=
value
.
length
Logger
.
info
(
this
.
tag
,
`getRawFd fd :
${
this
.
fd
}
, offset:
${
value
.
offset
}
, length:
${
value
.
length
}
`
)
}).
catch
(
err
=>
{
console
.
log
(
`getRawFd fail err:
${
err
}
, message:
${
err
.
message
}
, code:
${
err
.
code
}
`
);
...
...
@@ -53,8 +55,9 @@ class AudioRenderer {
let
bufferSize
=
await
this
.
audioRenderer
.
getBufferSize
()
Logger
.
info
(
this
.
tag
,
`audioRenderer bufferSize:`
+
JSON
.
stringify
(
bufferSize
))
let
stat
=
await
fs
.
stat
(
this
.
fd
);
let
len
=
stat
.
size
%
bufferSize
==
0
?
Math
.
floor
(
stat
.
size
/
bufferSize
)
:
Math
.
floor
(
stat
.
size
/
bufferSize
+
1
);
// let stat = await fs.stat(this.fd);
// let len = stat.size % bufferSize == 0 ? Math.floor(stat.size / bufferSize) : Math.floor(stat.size / bufferSize + 1);
let
len
=
this
.
length
%
bufferSize
==
0
?
Math
.
floor
(
this
.
length
/
bufferSize
)
:
Math
.
floor
(
this
.
length
/
bufferSize
+
1
);
let
buf
=
new
ArrayBuffer
(
bufferSize
);
while
(
true
)
{
for
(
let
i
=
0
;
i
<
len
;
i
++
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录