Help me! simple audio code

Blitz3D Forums/Blitz3D Programming/Help me! simple audio code

mimox(Posted 2010) [#1]
Please someone can help me or shom me some examples, I have to on and off a music (mp3) with the keys keyboard, example: I would like to do this way: When I press Key 1 the music go to play, if I press 2 go to stop. I'm beginner!

Thank you again


Chi3f Stadi(Posted 2010) [#2]
you can do something like that

yoursong=LoadSound("favourite.mp3") 
LoopSound yoursong 

channel=PlaySound(yoursong) 

Repeat


	If KeyHit(2) PauseChannel channel
	If KeyHit(3) ResumeChannel channel

Until KeyHit(1)



mimox(Posted 2010) [#3]
Thank you!