Jump to content

Cannot play Phaser.Sound instances more than once


Recommended Posts

There is no special code to show.


I'm loading the sound files from a json asset pack like this:

{  "default": [      {        "key": "my-sound",        "type": "audio",        "urls": [            "assets/game/snd/my-sound.mp3",            "assets/game/snd/my-sound.ogg"          ],        "autoDecode": true      }    ]}

And instantiating it this way:

var  sound = new phaser.Sound(      phaserInstance,      'my-sound'    );sound.allowMultiple = true;sound.loop = true;

After the default game state is created I'm triggering sound.play() when clicking an display object. The sound plays once but never loops. Triggering sound.play() again does not work.


The console says "Phaser.Loader fileComplete invalid index 48."


Browser is latest Chrome and Firefox on OS X.


I think the problem is, that the audio files will be served partially, since the servers response header says "Code 206 Partial Content".

Link to comment
Share on other sites

  • 2 weeks later...

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...