SFML community forums
Help => Audio => Topic started by: Etane on June 17, 2009, 09:11:02 pm
-
I'm having a little trouble trying to load a music file (.OGG) into my application. i am using the tutorial source just to try and test the audio, but it cant seem to find the file specified..
#include <SFML/Audio.hpp>
#include <iostream>
int main()
{
sf::Music Music;
if (!Music.OpenFromFile("test.ogg"))
return EXIT_FAILURE;
Music.Play();
while (Music.GetStatus() == sf::Music::Playing)
{
sf::Sleep(0.1f);
}
return EXIT_SUCCESS;
}
i have my IDE (VS 2008) set in debug mode, and i have the audio file (test) in both my debug folder and the directory of my solution. there is no error, i debugged it and Music.OpenFromFile() is returning false... but i can figure out why it cant find it. any help would be greatly appreciated.
-
Did you copy the audio DLL's to your debug directory?
Did you try other file?
-
Yes i have tried 3 different files, and the DLL's are in both my system 32 and my debug folder, the app would not compile to begin with, if i didn't have them there. but thanks for the ideas.
-
What does the SFML error output (stderr) say?
Maybe, the DLLs are not the right ones. Download OpenAL32.dll, wrap_oal.dll and libsndfile-1.dll, place them into your solution directory (not "Debug" folder) and try it again. I had a similar error a while ago.