GLBasic forum

Main forum => Bug Reports => Topic started by: MrTAToad on 2010-Aug-26

Title: STOPSOUND not working
Post by: MrTAToad on 2010-Aug-26
STOPSOUND (with the correct channel) doesn't actually stop a sound working :

Code (glbasic) Select
PLAYSOUND (5, mx/100, my/100)
STOPSOUND 5


Plays the sound, but doesn't stop it.
Title: Re: STOPSOUND not working
Post by: Kitty Hello on 2010-Aug-26
you must stopsound the return value of playsoud (it returns a handle)
Title: Re: STOPSOUND not working
Post by: backslider on 2010-Aug-26
Ahhh Kitty xD You´re too fast!^^

local sound%
sound%=playsound(5,mx/100,my/100)
stopsound sound%

cheers  :D
Title: Re: STOPSOUND not working
Post by: MrTAToad on 2010-Aug-26
Ah yes, forgot about the handle being needed... :good: