I am trying to get 3D positional sound working in game, I have 2D sounds working, and 3D sounds will play, but will always be at the same volume, regardless of where the sound or the listener are positioned. This is an issue regardless of starting FMOD with hardware or software. I am definitely taking of care of setting the position of the channel when playing the sound, and setting and updating the listener position. I have tried not setting the min and max distance of the channel, and setting it .1 and 10,000 respectively. I have also changed from the logarithmic roll off to linear, severely placing the sound where it should be far out of range of the listener object, with no change in the volume of the sound.
Searching the forums it seemed that there are two main problems that commonly cause this kind of behavior, forgetting to call update on the FMOD::System, and having the listener’s forward and up vectors be non-perpendicular. I am definitely updating the FMOD::System and my listener’s forward and up vectors are perpendicular, and I was wondering what else could cause this kind of behavior. Any help or insight would be greatly appreciated.
- rblocher asked 8 years ago
Thanks for responding. There were a couple of FMOD_RESULTS I was not checking, the main problem was that I was attempting to set the 3D attributes of a channel on the line before it was technically active, so it was the INVALID_HANDLE error.
- rblocher answered 8 years ago
Hi rblocher, welcome to the FMOD forums!
Are you checking the FMOD_RESULT returned from all the function calls, sometimes there might be an error that is missed. That is a common stumbling block for new users. Most likely would be an INVALID_HANDLE error. Take a look at the 3D example that comes with the API, setting up 3D sounds should be relatively straight forward.
- Guest answered 8 years ago
Please login first to submit.