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

Author Topic: Visual Studio 2017 & SFML: Where To Load Audio From  (Read 2082 times)

0 Members and 1 Guest are viewing this topic.

RainyAngel

  • Newbie
  • *
  • Posts: 1
    • View Profile
Visual Studio 2017 & SFML: Where To Load Audio From
« on: October 21, 2018, 03:04:58 am »
So I am in VS 2017 and using SFML to add sound into my OpenGL project.
 I have a method that calls the Sound Buffer like so:
//initialize sound buffer
   if (!buffer.loadFromFile(filePath))
      return -1;
   else {
      return 0;
   }

I then simply try to call my wav sound file from the project folder (where the .vcxproj and those files are).
i.e. LoadSound("sound\sound.wav");

However, this call continues to fail. Are my audio files supposed to be somewhere else?

Thanks!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10815
    • View Profile
    • development blog
    • Email
Re: Visual Studio 2017 & SFML: Where To Load Audio From
« Reply #1 on: October 21, 2018, 09:34:20 am »
Check your project settings under debugging what the working directory is set to.

Also there will be some additional information in the console as to why it failed.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/