PlaySound weird slowdown issue?
Posted: Mon Jun 08, 2009 5:57 am
Hey guys. I've not been here in a while but I've started messing with a new project in Pb. I've been having an issue with my game not working right once a sound is played.
Could someone confirm for me that they experience the same result with this program:
http://www.dracsoft.com/zips/2ds.zip
Run the game, use WSAD to move around. Note the speed you move. Now left-click to fire, or right-click to reload and thus cause a sound effect to play. The sound plays fine, but all of a sudden the movement speed is practically zero.
The yellow AI players stop moving at the right speed too.
This does *not* happen when I change:
To this:
With those two lines commented out, the player does not slow down, and all is normal, (except no sounds).
Could someone confirm for me that they experience the same result with this program:
http://www.dracsoft.com/zips/2ds.zip
Run the game, use WSAD to move around. Note the speed you move. Now left-click to fire, or right-click to reload and thus cause a sound effect to play. The sound plays fine, but all of a sudden the movement speed is practically zero.
The yellow AI players stop moving at the right speed too.
This does *not* happen when I change:
Code: Select all
Procedure PlaySFX(sfx.l, loop.b = 0)
If IsSound(sfx)
If loop=1
PlaySound(sfx,#PB_Sound_Loop)
Else
PlaySound(sfx)
EndIf
EndIf
EndProcedure
Code: Select all
Procedure PlaySFX(sfx.l, loop.b = 0)
If IsSound(sfx)
If loop=1
;PlaySound(sfx,#PB_Sound_Loop)
Else
;PlaySound(sfx)
EndIf
EndIf
EndProcedure