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

Author Topic: Audio Issue in my new poor Super Mario game? [SOLVED]  (Read 1074 times)

0 Members and 1 Guest are viewing this topic.

Tigre Pablito

  • Full Member
  • ***
  • Posts: 226
    • View Profile
    • Email
Audio Issue in my new poor Super Mario game? [SOLVED]
« on: June 01, 2017, 10:43:41 pm »
Dear Ladies and Guys of SFML

I'm working on a new version of Super Mario, that has many advanced features, such as the hammer and rakoon suit, and that the assets are packaged into an unique file.

I don't know if this has or not to do with what i'm experiencing with music. It happens, that sometimes while playing my poor Mario game, the music has to change. For example, when Mario takes the invincibility star, so as when its power ends up. Or when you go into a sub level.

I tried using the Stop() method and Play() to (re)start the music, but i got several crashes that hadn't even a letter with the Exception letter informing what was up.
Then I switched to use the Dispose() method and to re instantiate the next Music to be played. Anyway, but less, the crashes continued.

Could anyone please tell me how to handle the Music object correctly?
Thanks in advance

I SEARCH IN THE DOCUMENTATION AND FOUND THE PROBLEM. IF YOUR SOUNDS AND MUSICS GET THEIR SOURCE FROM A BUFFER (NOT FROM A DISK FILE), IT HAS TO REMAIN IN MEMORY WHILE PLAYING
« Last Edit: June 02, 2017, 12:52:31 am by Tigre Pablito »

 

anything