Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Cannot open file  (Read 16788 times)

0 Members and 1 Guest are viewing this topic.

Srejv

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Cannot open file
« 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)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Cannot open file
« Reply #1 on: November 03, 2007, 02:47:34 pm »
If you can't load images and sounds, I think there's rather something wrong with your paths or your working directory.
Laurent Gomila - SFML developer

Srejv

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Cannot open file
« Reply #2 on: November 03, 2007, 06:20:10 pm »
I've put them in the same directory, tried different directories, and I'm loading from the same folder. Even tried "./file.ext".

 :(

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Cannot open file
« Reply #3 on: November 04, 2007, 04:07:36 am »
Can you run the SFML samples included in the SDK ?
Laurent Gomila - SFML developer

gamecoder5

  • Newbie
  • *
  • Posts: 10
    • View Profile
Cannot open file
« Reply #4 on: January 29, 2008, 04:12:51 pm »
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.

Kobel

  • Newbie
  • *
  • Posts: 2
    • View Profile
Cannot open file
« Reply #5 on: April 05, 2008, 04:23:57 am »
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  :!:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Cannot open file
« Reply #6 on: April 05, 2008, 06:49:43 am »
No, SFML doesn't support MP3, mainly for licensing reasons.

You're right, I should explicitely mention it somewhere ;)
Laurent Gomila - SFML developer

Kobel

  • Newbie
  • *
  • Posts: 2
    • View Profile
Cannot open file
« Reply #7 on: April 05, 2008, 03:26:16 pm »
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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Cannot open file
« Reply #8 on: April 05, 2008, 05:35:16 pm »
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).
Laurent Gomila - SFML developer