Timing

BlitzPlus Forums/BlitzPlus Beginners Area/Timing

Jay(Posted 2004) [#1]
Hi, I have just recently gotten into Blitzplus and I need some advice on how to get something done. I have a routine to display a graphic and play a wav file. I don't want any further processing to occur until the wav is done playing. I tried using delay, but that does not work like I expected it to. The delay seems to come before the graphic is displayed even though it comes after in the code. Is there a reference somewhere that explains this kind of stuff? Thanks


Kevin_(Posted 2004) [#2]
http://www.blitzbasic.com/bpdocs/command.php?name=ChannelPlaying&ref=2d_cat


Jay(Posted 2004) [#3]
Thank you! Works perfectly as you knew it would.


Jay(Posted 2004) [#4]
By the way, is the Programming 2D Games in Blitz Basic a worthwhile buy for someone working in Blitzplus?


Kevin_(Posted 2004) [#5]
I haven't seen it so I cannot say. But I have heard good things about it.


keyboard(Posted 2005) [#6]
I got it, and was very happy with. There are some small differences with Blitz2D and Blitzplus, like the backbuffer being the default buffer, but they are easy to get the hang of, and it is handy to have a written manual, IMO.


Lattyware(Posted 2005) [#7]
'The delay seems to come before the graphic is displayed even though it comes after in the code.'

this is probably because, even if it's after the image, is it after the flip???


Jay(Posted 2005) [#8]
I am trying to get a small sound file to loop. From the docs, this is an example of what should work, but hte sound only plays once. Obviously I am doing something wrong. Oh, I did update my Blitzplus and installed the updated doc pak. Can one of you savants tell me what I need to make this happen? Thanks!

LuteSnd = LoadSound("sfx\lute.wav")
LoopSound LuteSnd
sndefct=PlaySound (LuteSnd)

While Not KeyHit (1)
Wend
End


Jay(Posted 2005) [#9]
Ok I found the new flags in playsound. Stupid me to look in the loopsound documentation first. Doh!