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...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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