stevefromio Posted July 28, 2015 Share Posted July 28, 2015 Ok, on my quest to decode .wav files (???) I tried the following: snd = game.sound.play('my-sound');snd.onDecoded.add(function() { console.log('decoded'); }, this); and I don't get any response from console.log. I also copied this straight from an example: sound1 = game.add.audio('explosion');game.sound.setDecodedCallback([ sound1 ], start, this); AGAIN, nothing. What made SpriteKit so easy to learn was the documentation. It contains clear instructions on what the class does, then shows each method used in context. That would be extremely helpful here. Link to comment Share on other sites More sharing options...
rich Posted July 28, 2015 Share Posted July 28, 2015 WAV files don't need to decode. MP3s, OGGs, they decode. However wav files also don't work in lots of browsers (including IE), so it'd make far more sense to use a more supported format. Link to comment Share on other sites More sharing options...
stevefromio Posted July 28, 2015 Author Share Posted July 28, 2015 Thats funny because I put this in update: if (sound1.isDecoding) {console.log("still decoding")} and logged 'still decoding' 204 updates then stopped the second the sound was available. Why did that happen? Link to comment Share on other sites More sharing options...
stevefromio Posted July 28, 2015 Author Share Posted July 28, 2015 I was using an old version of Phaser. Link to comment Share on other sites More sharing options...
Recommended Posts