In the docs what is the difference between “Supported music formats” and “supported audio formats” im kind of confused by this, thanks to anyone who can clarify this !
This is mostly out of date today, I believe.
Previous devices and OS versions had separate music/sound playback channels/APIs and the supported formats were those specified in each platform’s documentation. If you use AudioEngine and/or play audio on newer devices and OS versions I believe music and sound are now one and the same.
what if I use simpleAudioEngine same thing ?, i see on supported audio formats, for ios it only lists caf and m4a, but I currently use .wav sound effects and they work fine. was music for like larger files and audio for sound effects ?
Ah, so yeah there’s more to it, but the separate sound/music is kinda no longer relevant.
Audio formats on the other-hand do still differ per platform. It’s mostly .ogg/.wav for Android/Win/Linux and .mp3/.caf for iOS/Mac (.wav can play everywhere, and I believe .ogg can play on iOS now?? and .mp3 on prob all platforms).
Anyway, to keep the final game package install size as small as possible .mp3/.ogg are often used for music and for longer sounds whereas .wav/.caf can be used for short sounds since they take up more storage space.
I believe SimpleAudioEngine is now a thin wrapper around AudioEngine, at least in the most recent version of cocos2d-x.
Also, I think AudioEngine will try to stream in audio files that are larger than some X bytes, but don’t quote me on that???
If you care about nuance you’ll have to peek into source, or continue asking so one of the core team can answer with the exact specifics.
I think this is because of SimpleAudioEngine methods, which are separate for game music and sounds.