0

我需要从音频文件中提取前十(10)秒。

我们有以下代码。

var file = recording.stop(); 
sound = Titanium.Media.createSound({sound:file});

我需要从声音对象中提取前 10 秒。

我们怎么能做到这一点?

另外,如何合并两个声音对象。

前任:

sound1有 10 秒和 15 秒sound2

我想要sound3的是sound1 + sound2

应该sound1连续播放sound2

提前致谢。

4

1 回答 1

0
var sound = Ti.Media.createSound({
    sound: file,
    duration: 10
});

这将为您提供前 10 秒的时间,sound但即使looping设置为true您也需要创建自己的自定义计时器以在播放的声音之间交替。

于 2011-06-13T17:33:16.223 回答