When using pausechannel command what can U use for a handle
pausechannel command
Blitz3D Forums/Blitz3D Beginners Area/pausechannel command The variable that you set to the playsound(sound) command:
sound = loadsound("sound.wav") sound_playing = playsound(sound) pausechannel(sound_playing)
I understand your stuff above. But it's when I use like this
it plays both sound which cool but I'm trying to tell it to wait for this sound to finish then play the next one
what command do I use to do this
;Play some sound please :) CreateListener(Camera,box,1,1) StartEngine=LoadSound("somethings moving.ogg") StartChannel = EmitSound(StartEngine,box) MotorRunning=LoadSound("space bar.ogg") IdleChannel = EmitSound(MotorRunning,box) PauseChannel IdleChannel ResumeChannel IdleChannel ;End of Sound Setup
it plays both sound which cool but I'm trying to tell it to wait for this sound to finish then play the next one
what command do I use to do this
Thank u for showing me that example I understand that better but can use this setup u show me more than once puki
I think this should do it:
This will allow you to do other things while the sound is "starting".
This will lfreeze program execution until idle channel starts.
;Play some sound please :) CreateListener(Camera,box,1,1) StartEngine=LoadSound("somethings moving.ogg") MotorRunning=LoadSound("space bar.ogg") StartChannel = EmitSound(StartEngine,box) repeat if channelplaying(StartChannel) = false then IdleChannel = emitsound(MotorRunning,box) until keydown(1) ;End of Sound Setup
This will allow you to do other things while the sound is "starting".
;Play some sound please :) CreateListener(Camera,box,1,1) StartEngine=LoadSound("somethings moving.ogg") MotorRunning=LoadSound("space bar.ogg") StartChannel = EmitSound(StartEngine,box) repeat until channelplaying(startChannel) = false IdleChannel = emitsound(MotorRunning,box) ;End of Sound Setup
This will lfreeze program execution until idle channel starts.
Thanks guys