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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - SuperCharger

Pages: [1]
1
It needs to be in the working directory. If you use VS then that's by default next to your vcxprj file. The working directory can usually be changed in the project settings.
That worked, just moved the files, thankyou

2
It means the wav file wasn't found. The errorr message is slightly misleading due to a bug that has already been fixed in master.
I currently have it located in my debug folder, where should I move it and what is the correct way to type in a string for loadFromFile(string)?

3
Audio / Failed to open sound file "canary.wav" (couldn't open stream)
« on: April 01, 2016, 08:07:26 am »
Not sure what I have done wrong or what I am missing but when I run this code I get
"Failed to open sound file "canary.wav" (couldn't open stream) message.
My code is:

sf::SoundBuffer music;

   if (!music.loadFromFile("canary.wav"))
   {
      std::cout << "Error" << std::endl;
   }

   sf::Sound buffer(music);
   buffer.play();

Pages: [1]
anything