_P4-hZ-A8ZRW4OpmqIwkpr7-U9 Posted November 25, 2014 Share Posted November 25, 2014 Whenever calling the .play() method of a Phaser.Sound instance I'm getting the following warning in my console: Phaser.Loader fileComplete invalid index 48. I'm loading two files per instance: OGG and MP3. Also, the sound will only play once and can't be looped or played again. How can I fix that? Link to comment Share on other sites More sharing options...
rich Posted November 25, 2014 Share Posted November 25, 2014 Show us your code (and also which browser / OS?) Link to comment Share on other sites More sharing options...
_P4-hZ-A8ZRW4OpmqIwkpr7-U9 Posted November 25, 2014 Author Share Posted November 25, 2014 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 More sharing options...
jouniii Posted December 4, 2014 Share Posted December 4, 2014 I posted a issue to github which causes similar error. Although it's Audio-tag related error. Maybe something related? https://github.com/photonstorm/phaser/issues/1405 Link to comment Share on other sites More sharing options...
Recommended Posts