Titanium 从 Ti.MediaSound 对象中提取前 10 秒的音频
我需要从音频文件中提取前十(10)秒。
我们有以下代码。
var file = recording.stop();
sound = Titanium.Media.createSound({sound:file});
我需要从声音对象中提取前 10 秒。
我们怎样才能做到这一点?
另外,如何合并两个声音对象。
例如:
sound1
有 10 秒,sound2
有 15 秒。
我想要 sound3
,它是 sound1 + sound2
,
它应该连续播放 sound1
和 sound2
。
提前致谢。
I need to extract first Ten(10) secs from an audio file.
We have the following code.
var file = recording.stop();
sound = Titanium.Media.createSound({sound:file});
I need to extract first 10 seconds from sound object.
How we can do this?
Also, How to merge two sound objects.
ex:
sound1
has 10 secs and sound2
has 15secs.
I want sound3
which is sound1 + sound2
,
which should play both sound1
and sound2
continuously.
Thanks in Advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这将为您提供
声音
的前 10 秒,但是即使将looping
设置为true
,您也需要创建自己的自定义计时器来交替播放声音。That will get you the first 10 seconds of the
sound
however even with thelooping
set totrue
you will need to create your own custom timers to alternate between the sounds playing.