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

Author Topic: Can't play music  (Read 4199 times)

0 Members and 2 Guests are viewing this topic.

SFML rulez

  • Newbie
  • *
  • Posts: 4
    • View Profile
Can't play music
« on: April 10, 2009, 04:36:25 pm »
If I try to play an ogg file, this error is displayed:

Code: [Select]
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


Here´s the source code:

Code: [Select]
#include <iostream>
#include <SFML/Audio.hpp>

int main()

{

    std::string FileName;
    sf::Music MusicPlayer;

    std::cout << "Insert Path to file: ";
    std::cin >> FileName;

    if (!MusicPlayer.OpenFromFile(FileName.c_str()))
    {
        return -1;
    }

    else

    {
        MusicPlayer.Play();
    }

}

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Can't play music
« Reply #1 on: April 10, 2009, 04:50:54 pm »
Are you still mixing debug and release configurations?
If not, try using your debugger to get more information about the error (this message is usually displayed when the system receives and uncaught exception).

One more question: are you using the static or the dynamic SFML libraries?
Laurent Gomila - SFML developer

SFML rulez

  • Newbie
  • *
  • Posts: 4
    • View Profile
Can't play music
« Reply #2 on: April 10, 2009, 05:06:01 pm »
Quote from: "Laurent"
Are you still mixing debug and release configurations?


No, i don´t still mix it.

Quote from: "Laurent"
One more question: are you using the static or the dynamic SFML libraries?


I use the Static library.

 

anything