AlxStop doesn't work?
by Mike Rowley · in Torque Game Engine · 09/17/2006 (1:01 pm) · 1 replies
I've been working on starting and stopping ambient sounds in my demo game. The sound starts as expected, but will not stop.
After some responces on the forum, making some changes, it still worked the same way, so I opened up the console (tilde key) during the game without any sounds starting.
I type in alxPlay(MySoundHandle); and the sound starts as expected.
I then type in alxStop(MySoundHandle); and the sound just keeps going, and going, ...err, ok. It never stops.
The only way I can get it to stop, is to call alxStopAll();
Calling alx directly tells me that it isn't my code. This is a real problem that needs looking in to.
edit to add: My sound is a 2d looping sound.
After some responces on the forum, making some changes, it still worked the same way, so I opened up the console (tilde key) during the game without any sounds starting.
I type in alxPlay(MySoundHandle); and the sound starts as expected.
I then type in alxStop(MySoundHandle); and the sound just keeps going, and going, ...err, ok. It never stops.
The only way I can get it to stop, is to call alxStopAll();
Calling alx directly tells me that it isn't my code. This is a real problem that needs looking in to.
edit to add: My sound is a 2d looping sound.
Associate James Urquhart
You need to obtain the handle for your sound from alxPlay. You can then use this handle to stop your sound, e.g.: