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

Author Topic: Sometimes Audio not loading  (Read 2847 times)

0 Members and 1 Guest are viewing this topic.

Flaze07

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
    • Email
Sometimes Audio not loading
« on: May 11, 2018, 04:51:09 pm »
This has been bugging me for a while...sometimes, when I load my application, the sound won't load and by won't load I mean
sf::Sound::loadFromFile() return false;
why does this happen ?, also if code is needed, please tell me

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10801
    • View Profile
    • development blog
    • Email
Re: Sometimes Audio not loading
« Reply #1 on: May 11, 2018, 05:17:35 pm »
Sometimes as in? Do you run it from different working directories?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Flaze07

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
    • Email
Re: Sometimes Audio not loading
« Reply #2 on: May 12, 2018, 04:52:21 am »
sometimes as in, there are times when it successfully worked, and there are times when it won't load ( I used two sf::SoundBuffer ), both of them fails to load.
I run it like this
i.e. my .exe is in C:\Program Files\game\game.exe
so my sound is in C:\Program Files\game\media\sound.wav

Dschoonmaker

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Sometimes Audio not loading
« Reply #3 on: July 31, 2018, 02:24:07 pm »
Are you using a .wav file? They have problems for me, .ogg seems to work fine.