I have released my newest game Last Half of Darkness: Society of the Serpent Moon - and sure enough - a few customers have emailed me with tech support issues reguarding sound weirdness.
I rely heavily on the
"is sound playing()=0" statement...that way I wait for a sound to finish before starting another sound (for dialog, etc.)
First... let me say I cannot recreate this on any of my test computers and most computers it works fine.
For some reason...on *some* computers... the command
"if Sound Playing(7)=1" equals 1 even though the sound has stopped playing. It stays stuck equaling 1 even though no sound is playing. weird huh?
Sound Playing(7)=0 is not registering as Zero when the sound is done playing. (again SOMETIMES its totally random)
I can only guess that "certain computers/audio cards" don't like the way I am clearing things up before starting a new sound?
`**********************************
`* _playsound Routine
`**********************************
_playsound:
tempsoundfile$="media/sound/"+sfile$+".wav"
if file exist(tempsoundfile$)
if sound exist(7) then stop sound 7
if sound exist(7) then delete sound 7
load sound tempsoundfile$,7
play sound 7
set sound volume 7,mainvol
endif
return
If no sound is playing - why is
sound playing(7)=1
Do I need to clear the sound buffer another way for cleaner code?
I am Baffeled!!!!!
Any suggestions welcomed. Thanks.