I cant get the sound to play and loop in my code please help.
;Eddie Tech V2.x
; ----------------
Graphics3D 800,600,32,2
SetBuffer BackBuffer()
Global sndMusicLoop
camera=CreateCamera()
light=CreateLight()
RotateEntity light,90,0,0
;load bgm
sndMusicLoop=LoadSound("Back_In_Black.MID")
; Load mesh
pob=LoadMesh("idle.x")
PositionEntity pob,0,-10,MeshDepth(pob)*2
ScaleEntity pob,0.5,0.5,0.5
RotateEntity pob,0,180,0
Repeat
FPS = 50
period = 1000 / FPS
time = MilliSecs () - period
;loop music1
SoundVolume sndMusicLoop,0.50
LoopSound sndMusicLoop
PlaySound sndMusicLoop
; Keys
If KeyDown (200) Then MoveEntity pob,0,0,-1
If KeyDown (208) Then MoveEntity pob,0,0,1
If KeyDown (203) Then MoveEntity pob,1,0,0
If KeyDown (205) Then MoveEntity pob,-1,0,0
RenderWorld
Flip
Until KeyDown (1)
Thanks guys
Last edited 2011
|