Mp3 sounds on windows target?


Hi, I remember reading about mp3 patents expiring and mp3 coming to c++ targets : is this working already ?

My mp3 sounds seem to load fine but when I check their duration it’s always 0 so I’m wondering if it’s an issue with my files or if that’s expected and I should use ogg / wav ?

Thanks !


I switched to ogg for testing and had to modify Starling AssetManager slightly because as it is now it only considers “mp3” and “mpeg” as valid sound extensions : by default it will load a .ogg as a bytearray :slight_smile:

It’s working great now, but I’m still interested in mp3 support status if anyone knows


Would you mind submitting a pull request to the project, so we can add your fix?

MP3 support is on the wishlist (now that the patents are expired):


Sure ! I’m not very good at GIT though, I use it at a very basic level, just for me, using the github client :sweat_smile:

I have to fork starling on my account, do the small fix and then find the pull request button I guess ? Gonna look into this, there’s also a small modification to do for Starling’s particle emitter to work with null texture

Thanks for the info about mp3 : I can definetely live without it, it’s more because I’m a curious guy and I like to know that kind of stuff ^^


Ok that was easy :slight_smile:

Is this the right way to do this ?


Yep! Looks good. For small edits, you can also edit online on Github, but doing it locally has the benefit of being easier to test, and make sure it compiles :grin: