0
0

Hi,

I am using a right handed co-ord system, therefore do I have to negate the z value for all sound attributes:

i.e. the Position, Velocity, Forward and Up attributes for the LISTENER, and the Position and Velocity for the 3D sounds. Or does it only apply to the position and velocity attributes?

Also, do i need to call FSOUND_3D_SetAttributes for “each” 3D sound per frame before calling FSOUND_Update? Its just that this dramatically slows the frame rate cause im now ‘updating’ 30 sounds per frame!

Thanks in advance,

B

  • You must to post comments
0
0

Thanks Brett,

Im not sure why its slowing down maybe its a memory issue???

It works fine on my machine but on older machines it kills the frame rate, as im only using samples instead of streams.

Cheers,

B

  • You must to post comments
0
0

Ok having a huge problem with frame rate here, so maybe one of you could suggest something!

Ok before i update all the 3d sound’s position’s and velocity’s i am getting around 90 FPS – which is grand!

Then, If i include the following pieces of code, which update around 15 sounds, it drops right down to around 15 FPS 👿

This bit loops through the 3d sounds in the “manager” class
[code:16qodkdk]
for(int i = 0; i < MAXSOURCES; i++)
{
if(this->loaded[i].getFmodDimension() == "3D")
{
this->loaded[i].setPositionAndVelocity(gPlayer1.lPos, gPlayer1.Vel);
}
[/code:16qodkdk]

this is the bit that is called (from above) for around 15 sounds per frame!

[code:16qodkdk]
void FmodSource::setPositionAndVelocity(SVector pos, SVector vel) {

mSourcePos[0] = pos.x;
mSourcePos[1] = pos.y;
mSourcePos[2] = -pos.z;

mSourceVel[0] = vel.x;
mSourceVel[1] = vel.y;
mSourceVel[2] = -vel.z;

if (!FSOUND_3D_SetAttributes(channel, mSourcePos, mSourceVel))
FmodSource::getErrors("setPositionAndVelocity");
}
[/code:16qodkdk]

I’d be grateful for any ideas!

Great system by the way 😉

B[/code]

  • You must to post comments
0
0

Hi,

ya im using [b:dfea243c]only[/b:dfea243c] samples, and for the 3d sounds im using:
FSOUND_HW3D | FSOUND_NORMAL | FSOUND_FORCEMONO

But i’ll try messing around with the parameters :roll:

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.