SFML community forums
Help => Audio => Topic started by: Srejv on November 03, 2007, 02:24:28 pm
-
I think there's something wrong with DevIL. I can't load audio:
Failed to read sound file "skeraeoo.ogg" (cannot open the file)
Failed to open "skeraeoo.ogg" for reading
:(
Can't load images either. :s (I have all the extlibs in the right folder)
-
If you can't load images and sounds, I think there's rather something wrong with your paths or your working directory.
-
I've put them in the same directory, tried different directories, and I'm loading from the same folder. Even tried "./file.ext".
:(
-
Can you run the SFML samples included in the SDK ?
-
Make sure that:
If your compiling in debug Mode, your using debug libs
If your compiling in Release Mode, your using release libs.
In VC 2005 Express, you right click on project, choose properties and right at the top shows the configuration (wether your in release or debug mode) make sure your libs match this.
I know this is the problem I had with loading images, so may very well apply to loading sounds as well.
I think many may be a little confused on this factor, because without following, things will not work or you get crazy results.
Scott.
-
I'm going through the tutorials, and in the music tutorial I can't get the music file to load. I changed the file name to that of an mp3 file which I put in the same directory, but it gives me a cannot open file error when I run. I tried it with 3 separate mp3 files at different bitrates, and then I went and used it SUCCESSFULLY with the .wav file I'd used for the previous tutorial (sound effects).
Any idea why this isn't working?
EDIT: Okay, tried something I should have done a while ago and loaded a .ogg file into the sample and it works. Does this package just not support mp3? If so, you should mention that somewhere :!:
-
No, SFML doesn't support MP3, mainly for licensing reasons.
You're right, I should explicitely mention it somewhere ;)
-
Okay, as long as I know, conversion shouldn't be a big deal :P
Is there a comprehensive list somewhere of the formats SFML supports? Not just for audio I mean, but for everything.
-
On the features page.
But the list of supported formats for fonts and sounds is too large (I mean, it's really huge), so I didn't put the complete list for them. If you want all the details, you can look at FreeType (for fonts) and libsndfile (for sounds).