sfml uncompatibility with .mp3, .wav suggest audio format

Started by
5 comments, last by BaneTrapper 11 years, 5 months ago
Hello.
So far in my game development days i used .mid or .mp3 audio format, but sfml 2.0 does not accept any audio format except these

/// Here is a complete list of all the supported audio formats:
/// ogg, wav, flac, aiff, au, raw, paf, svx, nist, voc, ircam,
/// w64, mat4, mat5 pvf, htk, sds, avr, sd2, caf, wve, mpc2k, rf64.

Support so many audio formats that i never heard of. Wonder if they are any good actually, or are they ever used nowadays.

1: Suggest a good audio format for long music 1-3-5 minutes long
2: Suggest a good audio format for sound effects 1-3 seconds long
3: Suggest a program to convert the music around
Advertisement
You want a lossless compressed format unless sound quality isn't a big deal then you go for lossy compressed formats. MP3 to my knowledge is not free to use, it has a license to use in your applications, so this might be why they don't support MP3 format.

Note that lossy formats will be lower in file size where as lossless formats will be larger. For example i have a 11 minute flac audio file which is pushing 80 meg in size. How ever in mp3 format its about 11meg. (Mp3 is a lossy compression format).

More reading material here:
http://en.wikipedia.org/wiki/Comparison_of_audio_formats
OGG is a container format like avi is.

Personally I would recomend the following:
Use vorbis for songs, package in ogg container.
Use flac for short sounds and also package it into ogg.
Use Audacity for converting.
I'd suggested vorbis (usually found in an ogg container) for pretty much any audio except maybe human speech (I'd suggest ogg/speex for that).

Stephen M. Webb
Professional Free Software Developer


Use Audacity for converting.
If possible go from Original -> output format, and not 1 output format to another! Just like an image, where you don't keep editing and re-saving jpgs.
Ogg Vorbis (.ogg) is a good free alternative to .mp3, so I also vote for that.
Thanks for the help, your the best!

This topic is closed to new replies.

Advertisement