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

Author Topic: Can't play audiofile, just get random characters  (Read 3403 times)

0 Members and 1 Guest are viewing this topic.

darbycrashgi

  • Newbie
  • *
  • Posts: 6
    • View Profile
Can't play audiofile, just get random characters
« on: March 08, 2016, 02:06:56 pm »
When I try to play an audiofile, I get a console window, which just shows a lot of random characters. And after that a screen pops-up saying: console-aplication3 has stopped working. When i open the debugger I get this error: Unhandled exception at 0x6B37DC17 (vcruntime140.dll) in ConsoleApplication3.exe: 0xC0000005: Access violation reading location 0x00CE4000.
This is my code:
#include "stdafx.h"
#include <SFML/Audio.hpp>
int main()
{
   sf::Music test;
   if (!test.openFromFile("music.ogg"))
      return -1; // error
   test.play();
}
anybody knows what goes wrong?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Can't play audiofile, just get random characters
« Reply #1 on: March 08, 2016, 02:29:57 pm »
Mixed Release and Debug?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

darbycrashgi

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Can't play audiofile, just get random characters
« Reply #2 on: March 08, 2016, 04:39:07 pm »
Mixed Release and Debug?
I'm using visual 2015 on windows 8, with the build in debugger, if that's what you mean

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Can't play audiofile, just get random characters
« Reply #3 on: March 08, 2016, 05:29:33 pm »
No, I mean whether you link Release libraries in Debug mode or vice versa. Also possible is that you're using an SFML version that wasn't compiled for exactly your compiler version, or with exactly the same flags.

There are approximately 3000 threads about this issue, so if double-checking your configuration doesn't help, you might want to read one of them :)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

 

anything