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.

Bug Reports / Stopping sound that hasn't been played yet takes a long time

Author
Message
Dr Tank
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Southampton, UK
Posted: 2nd Jul 2011 01:11 Edited at: 2nd Jul 2011 01:12
See code. I attach a sound file too.

Press ctrl to see effect of not calling "stop".

Press space or return to loop or play the sound, and after this any stop sound commands won't take much time to run. Curiously, you can press shift to play a different sound, and that will cure it too!

Notice also that the first play/loop call takes a long time too. Until this is fixed, i recommend people play+stop at least one sound once they've loaded them!

DBP 1.077, Windows 7.

Attachments

Login to view attachments
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 2nd Jul 2011 01:47
I don't really understand what that code is supposed to show.

Could you give step by step instructions of what to do and what to expect - and what you think ought to happen?
Dr Tank
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Southampton, UK
Posted: 2nd Jul 2011 02:19 Edited at: 2nd Jul 2011 02:23
Sorry. The code is overly complicated. This suffices:



What it shows it that before a "play sound" is used, "stop sound" takes several milliseconds. After either sound is played, "stop sound" takes virtually no time.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 2nd Jul 2011 14:20 Edited at: 2nd Jul 2011 14:24
That's no better for me - all I can really see is a flickering "0" at the top of the screen.

I think the following shows your point more clearly:



In all cases except one the timings are all zero. The exception is when no sounds have been played at all and nonzero timings are sometimes recorded.

I think that is your point and I agree something ain't right.

Edit

I'm using Vista 64 bit and U77RC7.

Also, your workaround makes sense. Of course a better solution is to only stop sounds that have been played.
Dr Tank
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Southampton, UK
Posted: 3rd Jul 2011 01:46
Yes that's a solution.

There's still the almost completely unnoticeable problem of the first call to "play sound" will be longer than usual! I'm putting a sound as quiet as possible (volume 0) and playing it after i've loaded my sounds now.

Login to post a reply

Server time is: 2024-04-19 00:28:46
Your offset time is: 2024-04-19 00:28:46