My fmod 3d listener works but I have a problem

This is my repetitive code

I guess my problem is understandable in this video (I can get the left, right, front, back vector values ​​of my camera.

Let me tell you, if I look behind my camera, the sound continues to come from the right instead of from the left.

Looks like this is because you aren’t setting the correct rotation- you are passing forward and up vectors of [0 0 1] and [0 1 0] which will mean the listener is always pointing globally forwards.
To correct this you will need to get your camera rotation, and from there calculate forward and up vectors. There are a few different ways to calculate them depending on what you get back from the camera’s rotation- what game engine / geometry library are you using?

my Engine, DirectXMath

Ok, well as far as I know that doesn’t have a camera class so I’ll assume that is your own creation? Do you have something in there like GetForwardVector() or GetLeftVector()?

I specified in my problem I can get my right, left, front and back values

So you did- in which case, you need to convert your camera’s front and up vectors to FMOD_VECTOR and call System::set3DListenerAttributes witth those instead of [0 0 1] and [0 1 0].

can you give an example?

Again, without knowing what your Camera class provides or your geometry’s handedness this might not be 100% correct, but I would expect something like this to fix the issue:

FMOD_VECTOR forward = { d3d.camera3D.GetForward().x, d3d.camera3D.GetForward().y, d3d.camera3D.GetForward().z};
FMOD_VECTOR up      = { d3d.camera3D.GetUp().x, d3d.camera3D.GetUp().y, d3d.camera3D.GetUp().z};
FMOD_VECTOR vel     = { 0.f, 0.f, 0.f };
system->set3DListenerAttributes(0, &listenerpos, &vel, &forward, &up);