RetroBASIC

Retrogamecoding(.org) => EGSL => Topic started by: GEEK on October 28, 2013, 10:16:11 PM

Title: stop sound?
Post by: GEEK on October 28, 2013, 10:16:11 PM
does anyone know hop to immediately stop a playing or looping sound?
not mute it, but stop it from playing?
thanks in advance (:
Title: Re: stop sound?
Post by: Cybermonkey on October 29, 2013, 08:50:03 PM
A playing sound can't be stopped. Only music can be paused.
Playsound works like this:
Code: [Select]
playsound (soundname,volume, channel, loop)Volume can range from 0 - 255.
Channel is a sound channel from 0-6 which means that 7 sounds can be played at the same time. Use -1 for EGSL to choose the next free sound channel.
Loop means: -1 = infinite, 0 = once, 1 = twice,...
Hope that helps.
Title: Re: stop sound?
Post by: GEEK on October 29, 2013, 11:52:43 PM
That certainly helps!
stopsound() could be a handy function in the next version maybe? (:
thank you!