简体   繁体   English

SoundJS:部分预加载

[英]SoundJS: Partial Preload

I am developing a simple quiz game for fun. 我正在开发一个简单的趣味问答游戏。 The player has to listen to a MP3 file and guess the associated game and/or character's name. 播放器必须收听MP3文件并猜测相关的游戏和/或角色的名称。 Currently, I am preloading the whole audio file through SoundJS. 目前,我正在通过SoundJS预加载整个音频文件。 The game can be tried here: http://simon.pcharest.ca/quiz/ 可以在这里尝试游戏: http : //simon.pcharest.ca/quiz/

What I would like to do is to preload and play only a 10 seconds audio clip, starting at a random position. 我想做的是从随机位置开始预加载和播放10秒钟的音频剪辑。 This would make the loading much shorter and the game a bit harder too. 这将使加载时间大大缩短,游戏也变得更加困难。

Is this something doable with SoundJS, and if so, could anyone please point me in the right direction? SoundJS可以解决此问题吗?如果可以,请问有人指出正确的方向吗?

Thank you very much for your time. 非常感谢您的宝贵时间。

createjs.Sound.play("MyAudioSprite", {startTime: 1000, duration: 400}); createjs.Sound.play(“ MyAudioSprite”,{startTime:1000,持续时间:400});

Source: http://www.createjs.com/docs/soundjs/classes/AudioSprite.html 资料来源: http : //www.createjs.com/docs/soundjs/classes/AudioSprite.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM