Sound pause and resume problem

My problem is the following:

I’ve an ipo animation and I start the animation with the game engine actuator (ipo actuator). I set the actuator to Loop Stop and, when I stop the animation and then resume it, the animation start from the last frame where it stopped. I’v also an audio track that have to play during the animation, but if I stop the audio I can’t resume it (the audio begin form the start).

What I could do?

I’ve used also playSound(), pauseSound() and stopSound() in python but it seems that thy don’t work (whit the pauseSound working could be solved).

Help!

AlexMuseo

I’ve run into the same thing with sound. I don’t know. Maybe the sound in pygame can do it, I haven’t tried. Otherwise, try to find some work around, like make shorter ipo’s that can play all the way through with shorter soundfiles, and don’t do a pause resume, or do a constant short sound that can be looped and it won’t be noticeable if it starts from the beginning. Sometimes you just have to make do.

I’m testing he “short sound file” solution. I wonder why the pauseSound() etc… don’t work. I’ve used it like a method of the sound actuator, maybe I’m wrong?

Hmm. Well, I learned a little something using the fade in script posted here. The setGain() function works without adding the actuator to gamelogic. In other words. You add the actuator to game logic only once until your finished with it. I have a feeling these other functions are being nulled by constantly adding the actuator to GameLogic every pulse. I haven’t tried it with pause resume yet, though.