|
Post by DJ Scantron on Nov 23, 2004 1:12:07 GMT -5
ok everybody, since the sound support in basic4gl is kinda limited (although on the bright side very esay and simple to do) i tried to find a way to get background music into a game. this is what i came up with, not pretty, but i think it will work.
dim sound,x sound = LoadSound ("c:\sound.wav") playsound (sound)
while true sleep (10)
x = x + 1 print "a" if x = 9400 then gosub pla endif
wend
pla: print "sound go" playsound (sound) x = 0 return
A few notes: i used a 22khz 16bit mono WAV file. the music was 94 seconds long, so you will have to ajust the x value according to your sound(also is the sleep timer changes, the you will have to recalculate the value)
I'm pretty new to basic4gl and programming in general, so please let me know what you think.
|
|
|
Post by ChrisBurch on Nov 23, 2004 14:22:37 GMT -5
|
|