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.
sync
sync rate 0
backdrop on
mysound=1
myothersound=2
load sound "BlowTorch.wav",mysound
load sound "BlowTorch.wav",myothersound
mytimerstart as dword
mytimerlast as dword
do
thrust=spacekey()
mytimerstart=timer()
if thrust
if sound looping(mysound)=0
loop sound mysound
endif
else
if controlkey()=0
stop sound mysound
endif
endif
if returnkey() then play sound mysound
if shiftkey() then play sound myothersound
avg_time_taken#=avg_time_taken#*0.9 + 0.1*(timer()-mytimerstart)
text 0,0,str$(avg_time_taken#,2)
box 50,10,50+50*avg_time_taken#,15
sync
loop