[SDL2]-Questions About Audio

Hi,

I’m planning far in the future to work on a cross-platform game authoring system.
The game authoring system will be created using C++/SDL2.

The game authoring system will contain code, graphics, sound effects, & music creation IDE.
I think I can do the code and graphics parts of the IDE with little trouble.
My problem is with creating the sound effects and music parts of the IDE.

Does SDL2 and/or SDL2_Mixer offer any method of saving data into both OGG and MP3 file formats?
The ultimate goal of this game authoring system would be to create a working HTML5 game that would run locally in Internet browser.
HTML5 audio support requires both OGG and MP3 to be 100% compatible across all the Internet browsers.

Again, this is far into the future, just doing some initial research to see if this is technically possible.
Thanks for your time!

JeZxLee
16BitSoft Inc.
Video Game Design Studio
www.16BitSoft.com

Hello,

It would be outside the scope of SDL to provide audio encoding
facilities. You can use your favorite encoder of choice for both Ogg
Vorbis and MP3, though I don’t actually know whether SDL supports MP3
out of the box (I have my doubts). If it does not as I suspect, you’ll
have to implement your own format loader (either on top of SDL Mixer or
outputting directly in the SDL audio stream). MP3 has strict patent and
licensing restrictions so game developers tend to avoid it nowadays in
favor of Vorbis and other more liberal formats. If you definitely need
MP3, your best bet would be to first investigate the
licensing/distribution cost ramifications (www.mp3licensing.com) and
then to grab any encoder that you find easy to use. Whether you can
bundle it with your IDE would depend on the license of the given encoder.

When it comes to Vorbis, things are easier. The libvorbis, libogg and
libvorbisfile libraries provide both encoding and decoding under a BSD
like license. You can easily bundle those with your application and do
your encoding. SDL Mixer supports Ogg Vorbis out of the box.

Good luck!

Kind regards,

Philip BennefallOn 8/12/2014 6:42 PM, JeZ-l-Lee wrote:

Hi,

I’m planning far in the future to work on a cross-platform game
authoring system.
The game authoring system will be created using C++/SDL2.

The game authoring system will contain code, graphics, sound effects,
& music creation IDE.
I think I can do the code and graphics parts of the IDE with little
trouble.
My problem is with creating the sound effects and music parts of the IDE.

Does SDL2 and/or SDL2_Mixer offer any method of saving data into both
OGG and MP3 file formats?
The ultimate goal of this game authoring system would be to create a
working HTML5 game that would run locally in Internet browser.
HTML5 audio support requires both OGG and MP3 to be 100% compatible
across all the Internet browsers.

Again, this is far into the future, just doing some initial research
to see if this is technically possible.
Thanks for your time!

JeZxLee
16BitSoft Inc.
Video Game Design Studio
www.16BitSoft.com http://www.16BitSoft.com

Well, I imagine the reason he asks for MP3 and Vorbis is that
providing the sound files in both formats is pretty much the only way
to be sure all major browsers will pick it up (some browsers don’t
support Vorbis, some don’t support MP3, and all other formats are
unreliable).