0
0

When I call FSOUND_3D_SetAttributes() for any reason, the sound I hear from the speakers is playing at least 3 times too fast. I have tried setting the doppler to 0, I have tried setting the listener and the emitters to position (0,0,0) and vel (0,0,0), but it still happening.
When I do not call FSOUND_3D_SetAttributes() there’s no problem.

What am I doing wrong?

Thanks,

  • You must to post comments
0
0

The problem appears to be FSOUND_3D_SetDistanceFactor().

No matter what value I put, no matter when I call it, I get the same effect.

I see there is an older posting some pages back about the same issue, the solution there was to do all the scaling before delivery to fmod.

I am finding I have to do the same thing as well. the 3d samples worked fine, even when i altered them to move the emitters instead of the listener.

my soundcard is Advanced AC97 Audio. You know, one of those built into the motherboard deals.

  • You must to post comments
0
0

That could be it. In the 3d example I tried the following:

[insert at 388]
FSOUND_3D_SetDistanceFactor(100);

[changed]
if (listenerflag)
listenerpos[0] = ((float)sin(t*0.05f) *100.0f * 33.0f); // left right pingpong

[changed]
s[(int)(listenerpos[0]/100.0f)+35] = ‘L’;

That should produce the same effect as the original, yes?

  • You must to post comments
0
0

Although this did work for the 3d sample, I am finding I cannot replicate the effect in my project. All of the emitters are in the xy plane, as is the listener. I wrote a method that takes a float scale and calls
FSOUND_3D_SetDistanceFactor(scale)
for(int x=0;x<samles.size();++x)
FSOUND_Sample_SetMinMaxDistance(samples[x],scale,1000000000.0f);

but I still have to position the listener right on top of the emitter for the sound to come out at anything more than the min volume.

  • You must to post comments
0
0

I found the solution in the end, and it was to call the scaling methods EVERY FRAME. Why I had to do this, I don’t know.

  • You must to post comments
0
0

yes, i had to call setdistancefactor every frame. i also had to call the sample scaling methods (i don’t have my code in front of me, i can’t put the exact name sorry). if i left out either of these, sound would not come out as expected. i also searched to see if they were being reset anywhere else in the code, and i could find no such possibility.

  • You must to post comments
0
0

That was my understanding, yes. The two things I had to call every frame were setdistancefactor and setminmaxdistance (iirc).

  • You must to post comments
Showing 6 results
Your Answer

Please first to submit.