Riddik Posted July 19, 2014 Share Posted July 19, 2014 Hello! Can i use each sound per separate file or need unite all sounds into one file - "sound sprite"?And is enough to use only ".ogg" format? Link to comment Share on other sites More sharing options...
lewster32 Posted July 19, 2014 Share Posted July 19, 2014 Can i use each sound per separate file or need unite all sounds into one file - "sound sprite"? Yes, the example is called an 'audio sprite': http://examples.phaser.io/_site/view_full.html?d=audio&f=audio+sprite.js&t=audio%20sprite And is enough to use only ".ogg" format? No, to support all current browsers you will need to use mp3 or AAC (mp4/m4v) as well, though there has been discussion about mp3 being problematic from a licensing standpoint. It's a bit of a minefield - but there's a detailed (and slightly difficult to work out) guide here: https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats Riddik 1 Link to comment Share on other sites More sharing options...
Riddik Posted July 19, 2014 Author Share Posted July 19, 2014 Thanks) Link to comment Share on other sites More sharing options...
Riddik Posted July 22, 2014 Author Share Posted July 22, 2014 Sorry, but i forced ask again.Why real need united all sounds in one file - audio sprite? After I did that, appeared some problems. All seemed better before united. Link to comment Share on other sites More sharing options...
lewster32 Posted July 22, 2014 Share Posted July 22, 2014 You don't need to do it, but I guess it means fewer HTTP requests when downloading your assets, and possibly slightly better decode times. I'm no expert on web audio though so I don't know if it provides any performance benefits. Riddik 1 Link to comment Share on other sites More sharing options...
Recommended Posts