Problem with GageSound

Hello,

I just tried to use GageSound for background music in a little game. The problem I have is that the music can’t be restarted when it has been finished the first time.
Within my method I call periodically the method isRunning() and if it returns true I call the play(…)-Method.
But this doesn’t work. :’(

Should I load the whole file again or am I doing something wrong?

Another problem: If the player dies I call the stop-method to switch background music off. When the game restarts and I call the play()-Method the music doesn’t start at the beginning. It will be continued where I interrupted it.

Please, help.

Ralf

Nobody? :’(

That should work. Can you post the code you’re using?

Here are some code:

  1. Loading the song within the constructor of my game
  1. Starting the sound with mouseclick

My game loop is running in its own thread. The music will be checked with this code:

The if-condition works as I get a “restart” written when I try to restart the song, but the music won’t be restard.

Regards.

Ralf