0

I am using the SoundJS library within the CreateJS suite. I use the LoadQueue class to preload all my sounds. I am finding that when I go to play a sound effect for the first time it's delayed by a good half second before it plays. After the first play, it will play perfectly after that.

The problem also re-occurrs if you don't play any sounds for a minute or so. Then playing a sound effect will have that delay on first play.

Any idea why? Is there a work around to fix the issue? (ie. playing background music at 0% volume.

Here is my code (using typescript) :

import ReelStop from "../sound/reelstop.mp3";

private queue = new createjs.LoadQueue();

this.queue.installPlugin(createjs.Sound);
this.queue.on("complete", this.handleComplete, this);
this.queue.addEventListener("progress", this.onProgress);
this.queue.loadManifest([
    // other sounds and images 
    {id: "reelStop", src: ReelStop},
]);


// after the preload complete has fired, the first time the sound is played there is that 500ms+ delay :

const reelStop= createjs.Sound.play("reelStop");
reelStop.volume = 0.5;

Thanks in advance for any ideas you may have


  • Can you post a code sample? I don't know how it would happen, but perhaps it has to reload the sound to play it, resulting in the delay. Do sounds in the git repo or online demos to it to you too? – Lanny Aug 14 '19 at 15:52
  • I've added a code sample. I do not notice the issue in the git repo or online demos. Thanks for the help Lanny! – Ryan Ritten Aug 15 '19 at 18:17
  • Any thoughts @Lanny? – Ryan Ritten Aug 19 '19 at 22:50

0 Answers0