0
0

Hello, I am getting unwanted behaviour with the just fail if quietest method:

1

  • I have one ambient event, and I set their minimum and maximum ranges to 100-800.
  • This event is made up of three layers with one sound each.
  • In one of the sound definitions I have a volume set to -6db.
  • As soon as I set in the range of both events they steal back and forth from each other continuosly causing stuttering.
  • If I disable this layer or set its volume to 0db it works as it should.

2 (with the same ranges as above)

  • I have one ambient event.
  • This event is made up of one sound.
  • If I step into one event it starts fading in as I expect until it reaches its minimum range.
  • I then enter the radius of the second event and it fails to play until it is louder than the first one.
  • When the first event gets stolen and I move towards the end of the second event it doesn’t completely fade out and the sound gets cut at around 1/2 the maximum volume.
  • If I step back into the range of this sound it does start nearly at 0 volume which is what I expect it to be cut out at as well.

In code we try and play an event on each frame if it is in range and specifically stop it if it goes out of range. Also before an event tries to play we initialize a Fmod::Event (INFO_ONLY) and set the min and max distance and 3d attributes to this object before we get our Fmod::Event(DEFAULT) and try to play it.

I am not sure if there is something along the way we are doing wrong but it does seem to happen more in some events than in others and it seems a lot of variables have an influence on it. It would be useful to know what is going on behind the scenes for calculating this culling method so we could focus our debugging.

edit I have also just realised that any event which contain a sound definition which volume is set to be less than 0 I get this stuttering behaviour.

Thanks in advance,
Pedro

  • You must to post comments
0
0

[quote="pcorvo":h21bcsep]
1

  • I have one ambient event, and I set their minimum and maximum ranges to 100-800.
  • This event is made up of three layers with one sound each.
  • In one of the sound definitions I have a volume set to -6db.
  • As soon as I set in the range of both events they steal back and forth from each other continuosly causing stuttering.
  • If I disable this layer or set its volume to 0db it works as it should.
    [/quote:h21bcsep]

Thanks for the report, I have added this to our tracker and we will look into it.

[quote="pcorvo":h21bcsep]
2 (with the same ranges as above)

  • I have one ambient event.
  • This event is made up of one sound.
  • If I step into one event it starts fading in as I expect until it reaches its minimum range.
  • I then enter the radius of the second event and it fails to play until it is louder than the first one.
  • When the first event gets stolen and I move towards the end of the second event it doesn’t completely fade out and the sound gets cut at around 1/2 the maximum volume.
  • If I step back into the range of this sound it does start nearly at 0 volume which is what I expect it to be cut out at as well.
    [/quote:h21bcsep]

I’m not sure I understand this one. What do you mean by "move towards the end of the second event"? Could you maybe draw a diagram?

Thanks,
Ben

  • You must to post comments
0
0

Sorry I probably explained myself wrong.
I have got the same 2 events with only one sound and one layer using the Just Fail if Quietest method and linear falloff.
These events are 3D positioned one after the other.
My character is always moving forward, as I get inside range for the first event the sound starts off nearly at 0 volume and as I approach its center it starts getting louder until it reaches maximum volume and down again as I move towards the second event. Once I get into the second event range it starts trying to play but it fails because it is the quietest. It then manages to steal when it becomes louder than the first one and as I keep moving forward it starts getting louder until it reaches its minimum range. The problem is that when I keep moving forwards towards the outer radius of the second event the sound does not fade to 0 but finishes at around 1/2 the volume.

Anyway, here is a diagram that explains it… My paint skills aren’t the best :)

[img:2gvmnmqk]http://img444.imageshack.us/img444/1047/eventdiagramxb1.jpg[/img:2gvmnmqk]

  • You must to post comments
0
0

Thanks for the diagram, that makes it much clearer.

I can’t reproduce the behaviour you describe here. The second event always fades to 0 for me. Could your code be stopping it too soon?

Can you try reproducing the issue in the FMOD Sandbox tool?

Thanks,
Ben

  • You must to post comments
0
0

We were using the distance parameter to calculate 3D pan level. Something was a bit wacky there.
It works fine now we upgraded to 4.19.09.

One more question regarding this method:

Does it take into account the age of an event? Or just the volume?
For example if I have a rapid fire gun that is used by my character and some NPC’s with max instances set to 3 and just fail if quietest I am expecting that my characters gunshots (which are always the closest/louder ones) are always audible. The problem is that I fire three shots and then the fourth fails to play.
I can understand that since my character doesn’t shift position while firing, gunshots will always be at the max volume and since my gunshots are 0.32 seconds each and I’m firing every 0.15 second, then Fmod decides the new ones are not louder and fails to play them.

However it would be really useful to have something like just fail if quietest and steal oldest combined.. like having just fail if quietest take into account the age of an event as well as it’s volume? I am not sure if this already happens and there is something bad in our end.

I’ve tried to use steal oldest but then the NPC’s using the same gun can steal my characters sounds since it doesn’t care about proximity only age.

Thanks!
Pedro

  • You must to post comments
0
0

[quote="pcorvo":22rfgdsj]1

  • I have one ambient event, and I set their minimum and maximum ranges to 100-800.
  • This event is made up of three layers with one sound each.
  • In one of the sound definitions I have a volume set to -6db.
  • As soon as I set in the range of both events they steal back and forth from each other continuosly causing stuttering.
  • If I disable this layer or set its volume to 0db it works as it should.
    [/quote:22rfgdsj]

Just to let you know, this week’s API release will include a fix for this issue. The relevant revision.txt entry is:

[code:22rfgdsj]
– Event API – Fixed "Just fail if quietest" max playbacks behaviour to use the
same audibility calculation for all events. This solves some bad
interactions with geometry, sounddef volume and event fadein that
could cause oscillations.
[/code:22rfgdsj]

  • You must to post comments
0
0

[quote="pcorvo":1p2erp92]One more question regarding this method:

Does it take into account the age of an event? Or just the volume?
For example if I have a rapid fire gun that is used by my character and some NPC’s with max instances set to 3 and just fail if quietest I am expecting that my characters gunshots (which are always the closest/louder ones) are always audible. The problem is that I fire three shots and then the fourth fails to play.
I can understand that since my character doesn’t shift position while firing, gunshots will always be at the max volume and since my gunshots are 0.32 seconds each and I’m firing every 0.15 second, then Fmod decides the new ones are not louder and fails to play them.

However it would be really useful to have something like just fail if quietest and steal oldest combined.. like having just fail if quietest take into account the age of an event as well as it’s volume? I am not sure if this already happens and there is something bad in our end.

I’ve tried to use steal oldest but then the NPC’s using the same gun can steal my characters sounds since it doesn’t care about proximity only age.[/quote:1p2erp92]

Just fail if quietest doesn’t take the age of events into account – it just steals the quietest event if the new event will be louder.

How would this combined mode work? The new event will always be the youngest, so in the case you describe it would never fail. You might as well just use steal oldest.

The simplest solution for your case is probably to have separate events for player guns versus NPC guns. This will give you the most control.

  • You must to post comments
0
0

Great news thanks :)

I guess this is probably a bit too specific, but from our example I am thinking Just Fail if Quietest behaves like:

"if event is louder than the ones playing then steal quietest of the ones playing, else fail"

and it would be useful in this case:

"if event is louder than the ones playing then steal quietest of the ones playing, else if it is equal then steal oldest of the ones playing, else fail"

Pedro

  • You must to post comments
Showing 7 results
Your Answer

Please first to submit.