Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi there! I'm having a bit of trouble with getting 3D audio to behave. I'm using irrKlang x64, 1.6.0, and the following code to play audio:
Here, Z+ is "up". The direction vector is correct (using it, I can draw a debug sphere in front of the camera at all angles). When using DirectSound, the position of the sound is rather random. Sound never really separates and the direction doesn't match up with the camera. When switched to WinMM, the position of the sound *is* correct, but the stereo separation is too much, with a close, head-on sound being much louder than when the sound source is significantly left or right of the camera. I can't really figure out what's wrong in either situations. I'd use WinMM if not for the disparately loud noise when it plays from significantly left/right from the camera - or I'd use DirectSound if the positioning was correct. Is there anything I can do to solve these issues? |
||||
|
Just got a suggestion on another forum that the rotation directions might not match. https://gtaforums.com/topic/9610... I flipped around the "Up" vector to point down, and things work great now with DirectSound. WinMM - ditched that, even with the provided demos, one side is basically muted. So, in the game, the (relative) coordinate system is: +X: Left, -X: Right +Y: Forward, -Y: Backward +Z: Up, -Z: Down Yaw: Increases counterclockwise around Z. I suppose irrKlang goes clockwise? I hope the flipped Z is correct, in this situation. |
||||
|
AFAIK, in irrklang, usually Y is up. Works for me since Irrlicht uses the same coordinate system as well. But not sure how to transform it to work with another one. |
|