Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [108.21]Is stopsound reliable to stop looped sound?

Author
Message
TDavid
11
Years of Service
User Offline
Joined: 7th Feb 2013
Location:
Posted: 11th Apr 2014 14:34
Hello.

I don't know if I'm doing something wrong or not. I have a wav looped with 'playsound(sound_a, 50, 1, 0)' and then ten seconds later I try to stop it and play a second sound with:

stopsound(sound_a)
stopsound(sound_b)//just in case
playsound(sound_b, 100, 0, 0 )

Most of the time, sound_a does stop. But from time to time, it doesn't stop and it keeps looping while sound_b plays. I'm 100% sure that the second piece of code is run because sound_b actually plays so there's no reason the first stopsound wouldn't be read.

Did I do something wrong? Did you get this issue as well and if you did, did you solve it? Thanks for your time.
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 14th Apr 2014 20:03
maybe continuously call
if GetSoundsPlaying(sound_a) > 0
StopSound(sound_a)
endif

I don't have issues with this in tier 1 on 10819, but Paul did update some of the sound stuff at some point (not sure if 108xx or v2).

I'm having some issues in 10819 where calling stop sound on a looping sound is causing a nasty skipping sound on iPhone 3GS. But I think that is unrelated to your issue.

Login to post a reply

Server time is: 2024-03-28 17:39:53
Your offset time is: 2024-03-28 17:39:53