0
0

Hi,

I want my sound volume to drop to zero after some time. I’ve tried to increase rolloff factor (distance factor is 1.0, as it should be) and it works (sound fades faster), but no matter how far I go from sound source, it is still there (although faint).

Is there an global options setting minimal sound volume? (I would say no)

How do I properly use FMOD_3D_LINEARROLLOFF? Do I have to set it before or after call to playSound() (using C++ interface)?

To my understanding, when using linear rolloff min distance is distance where linear attenuation starts, and max distance where it stops (i.e. volume is 0).
However, I wasn’t ablo to achieve this (sound doesn’t chage at all). It does change properly when using LOGROLLOFF (but does not go to zero, as mentioned before).

Thank you.

  • You must to post comments
0
0

japi are you using FMOD_SOFTWARE or FMOD_HARDWARE?

  • You must to post comments
0
0

FMOD_HARDWARE

Thanks for the answer :)

Edit: using FMOD_SOFTWARE the problem is still there.

  • You must to post comments
0
0

After setting min/max distance for channel, it somwhow works. It still does not go compleatelly silent (i.e. if I move 10000 units and max distance is set to 20 units, I can still hear it, its faint but can be heard). This is the only sound.

channel->getMode(&mode); (mode & FMOD_3D_LINEARROLLOFF) is true.
channel->get3DMinMaxDistance returns valid distances (as set before).

Where should I look next?

This is WinXP with Nvidia soundstorm if that matters. FMOD Ex is the last version (downloaded few days ago). MS VC.NET 2003 (VC7.1).

Thx,

  • You must to post comments
0
0

i’ve just tested this with all cases presented above, using the 3d example.

  1. 2.0 to 5.0 works as it should be, being full at 2.0 and silent at 5.0+. I tested with soundcard volume at full, using high quality headphones. No sound was heard outside of 5.0 range.
  2. hardware or software don’t matter.
  3. getAudibility gives the right values.

Changes i made

[code:1bypg3s4]
result = system->createSound("../media/drumloop.wav", FMOD_HARDWARE | FMOD_3D_LINEARROLLOFF | FMOD_3D, 0, &sound1);
ERRCHECK(result);
result = sound1->set3DMinMaxDistance(2.0f * DISTANCEFACTOR, 5.0f * DISTANCEFACTOR);
[/code:1bypg3s4]

[code:1bypg3s4]
result = system->createSound("../media/drumloop.wav", FMOD_SOFTWARE | FMOD_3D_LINEARROLLOFF | FMOD_3D, 0, &sound2);
ERRCHECK(result);
result = sound2->set3DMinMaxDistance(2.0f * DISTANCEFACTOR, 5.0f * DISTANCEFACTOR);
[/code:1bypg3s4]

[code:1bypg3s4]
// print out a small visual display
{
float aud1, aud2;

            channel1->getAudibility(&aud1);
            channel2->getAudibility(&aud2);

            sprintf(s, "|.......................<1>......................<2>....................|%.1f %.1f", aud1, aud2);

[/code:1bypg3s4]

  • You must to post comments
0
0

I’ve just tested the same thing with 3D example.

set max distance to 5.0f * DISTANCEFACTOR (instead of 10000.0f *…).
Add | FMOD_3D_LINEARROLLOFF to createSound mode.

Now, when moving left/right using <>, sounds are still being heard (faintly) event if outside of 5 distance.

Regards,

  • You must to post comments
0
0

One very interesting thing.

m_Channel->getAudibility(&aud);

aud = 0.00000

But sound is being heard….

  • You must to post comments
0
0

Now, I’m totaly confused.

m_Channel->setMute(true);

and I still hear it 😕

  • You must to post comments
0
0

Well, if I set FMOD_SOFTWARE flag during createSound, everything is as it should be. Will try to update my drivers…

  • You must to post comments
0
0

Sorry to bump this, but I’m having exactly the same problem, minimum getAudibility value is 0.062797 from a min max of 1 and 4.

  • You must to post comments
0
0

Hi Tony, check the docs on Channel::set3DMinMaxDistance. A maxdistance of 4 means that your sound never gets a chance to attenuate.

Cheers,

  • You must to post comments
0
0

[quote="andrew":2j4vyrrn]Hi Tony, check the docs on Channel::set3DMinMaxDistance. A maxdistance of 4 means that your sound never gets a chance to attenuate.

Cheers,[/quote:2j4vyrrn]Why? I have the same problem and i didn’t find that information in the documentation :S (using the .27 api)

Thanks in advance :)

  • You must to post comments
0
0

If i’m not wrong the min and max parameters using linear atenuation defines the point where atenuation starts and the point where atenuation stops and no sound is there when you pass this point.

But…? is there any limitation in min/max parameters?

  • You must to post comments
Showing 12 results
Your Answer

Please first to submit.