Today I tried the 3D Sound functions but I don’t hear a volume
difference when moving away from the sound source.
My camera system is right handed (OpenGL) so as mentioned
in the tutorial I negate the y and the z axis (also tried to only
negate the z axis).
I tested it by moving the camera from (0,0,0) away to (0,0,10)
or (0,0,-10) with MaxDistance set to 10.0f but the volume of
the channel does not change when moving away although the
the camera is setup correctly 😕
What I’m doing wrong ? 😳
[b:2xgc5eex]Here is my init code :[/b:2xgc5eex]
[code:2xgc5eex]int Channel= FSOUND_PlaySound(FSOUND_FREE, Sound);
FSOUND_3D_SetAttributes(Channel, VECTOR_ZERO, NULL); // Position the sound source at (0,0,0)
FSOUND_3D_SetMinMaxDistance(Channel, 0.1f, 10.0f);[/code:2xgc5eex]
[b:2xgc5eex]And my main loop code :[/b:2xgc5eex]
Vector<float> Forward= Cam::ActiveCam.GetForward();
Vector<float> Upward = Cam::ActiveCam.GetUpward();
FSOUND_3D_Listener_SetAttributes(Cam::ActiveCam.GetPosition().Vector, NULL, Forward.Vector, Forward.Vector, -Forward.Vector, Upward.Vector, Upward.Vector, -Upward.Vector);
} while (...);[/code:2xgc5eex]
I only have an onboard soundchip and don’t know if he supports hardware
channels so I also have this line before the FMOD_Init stuff :
[code:2xgc5eex]signed char res= FSOUND_SetMinHardwareChannels(4);[/code:2xgc5eex]
My units are same as the default fmod units (1.0f = 1 meter).
Btw what happens when everything is done in software, does this still
produce hearable volume differences when moving away from the
sound source or is it just not accelerated ?
Thanks for help !
- Megelan asked 12 years ago
Another thing is, when I use DirectSound instead Windows Multimedia
Waveout I can’t even hear a sound loaded with the FSOUND_HW3D flag 😕
So two things does not work here :
Windows Multimedia Waveout + FSOUND_HW3D + stereo wav [b:2zpu0iqu]=[/b:2zpu0iqu]
no 3d sound effect. With mono wav I can hear the 3d sound effect.
DirectSound + FSOUND_HW3D + any wav [b:2zpu0iqu]=[/b:2zpu0iqu] no sound, 100% silence
Any ideas ? 😳
thank you !
I made a debug on the vectors…the upvector is always (0,1,0) and the
forward always (0,0,-1) as it should be cause I’m only moving on the
z-axis (for testing) and don’t change the camera direction.
I really don’t know what remains to search for errors
Please login first to submit.