LoadSound file wav no work

Blitz3D Forums/Blitz3D Programming/LoadSound file wav no work

Yue(Posted 2016) [#1]
hello, loadSound command does not work with a wav file.

Any suggestions ?.


P% = LoadSound("Data\Sonidos\Motor.wav")

RuntimeError P%;  return 0




RemiD(Posted 2016) [#2]
Take a look at the codes of the Blitz3d samples, wav files are supported...
It may be a problem with your file.


Yue(Posted 2016) [#3]
Hi, I 'm working on Windows 10 , try the examples but do not work , it will be something related to Windows 10 ?

No Work.
; Load3DSound Example
; -------------------

Graphics3D 640,480
SetBuffer BackBuffer()

camera=CreateCamera()
PositionEntity camera,0,1,-10

light=CreateLight()
RotateEntity light,90,0,0

plane=CreatePlane()
ground_tex=LoadTexture("media/Chorme-2.bmp")
EntityTexture plane,ground_tex

cube=CreateCube()
cube_tex=LoadTexture("media/b3dlogo.jpg")
EntityTexture cube,cube_tex
PositionEntity cube,0,1,0

microphone=CreateListener(camera) ; Create listener, make it child of camera
sound=Load3DSound("media/ufo.wav") ; Load 3D sound

While Not KeyDown(1)

If KeyDown(205)=True Then TurnEntity camera,0,-1,0
If KeyDown(203)=True Then TurnEntity camera,0,1,0
If KeyDown(208)=True Then MoveEntity camera,0,0,-0.05
If KeyDown(200)=True Then MoveEntity camera,0,0,0.05

; If left mouse button hit then emit sound from cube
If MouseHit(1) = True Then EmitSound(sound,cube)

RenderWorld

Text 0,0,"Use cursor keys to move about"
Text 0,20,"Press left mouse button to make a sound be emitted from the cube"

Flip

Wend

End



Yue(Posted 2016) [#4]
Ok, no problem.


If the file was , I have to export 16-bit and not to 32 for Windows.




Yue(Posted 2016) [#5]
Problem volume no work. :(

SoundVolume ( sonidoMotor\sonido, 0 ) ; Continue volume, and no low volume.



Yue(Posted 2016) [#6]
Ok, no problem ChannelVolume.


xlsior(Posted 2016) [#7]
IIRC there are several different WAV formats, and blitz3D doesn't support all of them.