EmitSound Problems

Blitz3D Forums/Blitz3D Programming/EmitSound Problems

EmitSound only makes the sound after I shut down the program.
...

Global listener = CreateListener(camera)
...

Global hum = Load3DSound("Boats\Ore Carrier\Mesabi Miner\hum.wav") 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;Main Loop;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

starttime = MilliSecs() ;Setup FPS Values

While Not KeyHit(1)

...

UpdateWater()
UpdateWorld

EmitSound(hum,ship\mesh)

RenderWorld

...

Wend

...


You are emitting the sound constantly! Use the function only once, just before the while!

Hehe. Im amazed that didnt crash :)

Try

If Not ChannelPlaying(Sound)
Sound=EmitSound(hum,ship\mesh)
EndIF


Emerson Gresoski
Dynamic Games Entertainment
www.dynamicgames.com.br/novo or www.dynamicgames.com.br (for english)