0
0

The new alpha gets us one step closer to the beta. Nice!
A few things though, not directly related to this release, but anyway.
The multispeaker output is fixed, so I’ve gone back to my test-app trying to
fiddle with fmod 3d again. As it’s only now that I can hear “real” 3D in Ex I’ve been playing with the coordinates a bit.

1) I can’t straight things out. As I’m in a right handed system (Gizmo3D) I thought
setting RIGHT_HAND on system-init would work. But it doesn’t. Neither does the z-flipping for every vector concerned. Code below…

Looked at the forum :
http://52.88.2.202/forum/viewtopic.php … ght=handed
Didn’t get any wiser.

2) I have the same problem as the guy in :
http://52.88.2.202/forum/viewtopic.php … ght=handed
My main-loop rate is based on how many times the hardware can output frames, so this could be very very high. But calling Fsound-update every time in this loop causes frame rate slowdowns. Strange…Code below…

Regards,

/David (Audigy 2 ZS, Win2000)

(Note, I’m still newbie and the test-application is simply coded)

[code:3toie76o]//in my main-loop
soundSourceTrans->getTranslation(origin);
sourcepos.x=origin.v1;
sourcepos.y=origin.v2;
sourcepos.z=-origin.v3;

camPos=myCam->getPosition();
listenerpos.x=camPos.v1;
listenerpos.y=camPos.v2;
listenerpos.z=-camPos.v3;

//Get the at-vector from the camera to be applied on the listenerOrienation
camAt=myCam->getDirection();
listenerforward.x=camAt.v1;
listenerforward.y=camAt.v2;
listenerforward.z=-camAt.v3;    

//Get the up-vector from the gizmo-camera to be applied on the listenerOrienation
camUp=myCam->getNormal();
listenerup.x=camUp.v1;
listenerup.y=camUp.v2;
listenerup.z=-camUp.v3; 

//calculate the velocity, depending on last onidle position and the systemtime
listenervel.x=(listenerpos.x-listenerlastpos.x)/Seconds;
    sourcevel.x=(sourcepos.x-sourcelastpos.x)/Seconds;
    listenerlastpos.x=listenerpos.x;
    sourcelastpos.x=sourcepos.x;

  //Same for Y

    listenervel.z=-(listenerpos.z-listenerlastpos.z)/Seconds;
    sourcevel.z=-(sourcepos.z-sourcelastpos.z)/Seconds;
    listenerlastpos.z=-listenerpos.z;
    sourcelastpos.z=-sourcepos.z;


result = channel1->set3DAttributes(&sourcepos, &sourcevel);
ERRCHECK(result);

result = system->set3DListenerAttributes(0, &listenerpos, &listenervel, &listenerforward, &listenerup);
ERRCHECK(result);


    system->update();[/code:3toie76o]
  • You must to post comments
0
0

1) Right_handed-flag seems ok now, and I’ve removed the minus for z-values in code snippet, but I still can’t get the listeners position and at-vector right. The listener is always at origin. I will take a closer look. I’m not sure how to normalize…

2) The system->uptade() issue is either fixed with the new alpha 13 OR simply the fact that I restarted the computer…most likely.

Thanx, anyway Brett!

  • You must to post comments
0
0

[quote:3dc51rcx]But I still can’t get the listeners position and at-vector right. The listener is always at origin. [/quote:3dc51rcx]

Sorry, I mean SET the 3DListenerAttributes. The code is in the original post, here above. I’ve debugged the coordinates and they seem to be completely correct (right-handed, gizmo), but I don’t feel the FMOD-listener changes position. It’s stuck at origin with forward (at vector) pointing to -z (right-handed,).

Have a look at my demo, If you want to. Right-handed debugvalues on screen.
[url:3dc51rcx]http://kastel.org/filer/exjobb/test.zip[/url:3dc51rcx] (add fmodex-dlls to root)

  • You must to post comments
0
0

Ok! Now it works. Great! I misunderstood the meaning of HEADRELATIVE. Thanks!

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.