0
0

Hi,

Can we pan a channel which plays a 3D sound? I have two sound sources. One has 3D attributes and other 2D. I need to pan 3D sound in the left and 2D in the right channel. 2D sound source is panned easily by FSOUND_SETMODE(FSOUND_2D) and then calling FSOUND_SETPAN(channel_r,0). But 3D could not even I set flag FSOUN_FORCEMONO when I load the sample. I need to have a doppler method for my 3D sound so changing itss attribute to 2D sound will affect this event. Both of the sound sources are 16 bit, mono. How can I pan this 3D sound source?

  • You must to post comments
0
0

Thanks for the comment. But how can I do that? As you know inside update function we update listener and speaker position.In this case if I want to simulate pan I need to manipulate some vectors for listener but listener does not know left and right position just Up and Forward vectors.

My 3D attribute Listener Function is :

FSOUND_3D_Listener_SetAttributes(&listenerpos[0], &vel[0], 0, 0, 1.0f, 0, 1.0f, 0);

So cross product of top and forward vectors will make a right vector that I have in my current application but it can’t affect the right channel and I hear through right and left channel. Is there any other solution?

The other point is that changing this values won’t affect on channels and we still have sound though both of the channels but only thing changes is doppler effect and it is not my favorite in this application.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.