0
0

Hi,

I don’t understand how I’m able to load an event several times.

How may I load e.g. two cars in thew simple example?

Is this possible? Do I have to call getEvent two times (with two different references, of course)?

Sry, but I read the fmodex.pdf several times and searched for it in this forum and with google. But I didn’t find an answer.

Thanks
Philipp

  • You must to post comments
0
0

Use Event::setProperty, you can override the min and max distance at runtime already.

  • You must to post comments
0
0

Yes, call getEvent every time you want to spawn a sound. This creates a new instance for the sound, so make sure you have set the max playbacks to a good number or instances will disappear(the event handle could be stolen and used for a new instance).

  • You must to post comments
0
0

But I use Fmod Ex Stable not Dev and I can’t find Event::setProperty in Stable.

  • You must to post comments
0
0

Is it possible to group some events?

To update the 3D-Infos for one character I have to update every single event for that character?

  • You must to post comments
0
0

If you’re events are moving, yes, you have to update each event spawned.

  • You must to post comments
0
0

Hi, [I have problems related to that, so I use your post, OK?]

I have some problems when trying to use a lot of event instances (yes I know, I’m not the first one to post this , I also have searched -maybe not enough- in the forum but I’ve not found all information for our solution).

I have a lot of objects to manage (>400), created when launching our software, each of them playing the same event (e.g. a motor).
All these objects are moving around the listener.

Briefly, I should say I need:
[list:ykmqr78i]* a behaviour: "Fail if the new event is quietest than all the other active events, otherwise steal the quietest"

  • a way to "automatically" allocate an event to a waiting object, when an event instance become available (one instance is stopped or become quietest than a waiting sounds)
    [/list:u:ykmqr78i]
    With the current "Max playbacks behavior" and event API available, I’m not satisfy with the way I use to solve this problems:
    [list:ykmqr78i]* "Just fail if quietest" seems to be the response, except that I can not see how it works to evaluate the volume based on the distance and parameter values

        * how to identify events that were stolen ? Until now, I use FMOD_ERR_INVALID_HANDLE error when updating event position or parameter value to decide that the event is stolen.
    
        * how to re-activate them ? I try to get a new event for active sounds marked as "stolen" each cycle.
    

    [/list:u:ykmqr78i]
    I do not have a complete solution, but some questions:
    [list:ykmqr78i] * Would it be useful(possible ?) to have something like:
    [list:ykmqr78i]* create a "preview"(preheard ?) event, with all its information: position, speed, orientation, parameters value, … -> that gives its volume

    • try to insert it into the pool of events (then, treat failure to activate the event again after a while)
      [/list:u:ykmqr78i]
      * is it possible to have an explicit FMOD_RESULT value indicating that an event operation has failed due to the fact that this event has been stolen ? I get a generic error FMOD_ERR_INVALID_HANDLE and wanted to start specific treatment for a stolen sound.

      * would it be possible to integrate the "max playbacks" event aspect inside the virtualization algorithm ? This should be the most easy way for external use, of course !
      

      [/list:u:ykmqr78i]
      Thank for your help.

  • You must to post comments
0
0

Hi,

[quote="oroussel":13853ty8]Hi, [I have problems related to that, so I use your post, OK?][/quote:13853ty8]

These questions would probably have been better in a separate post, but never mind :-)

[quote="oroussel":13853ty8]
Briefly, I should say I need:
[list:13853ty8]* a behaviour: "Fail if the new event is quietest than all the other active events, otherwise steal the quietest"
[/list:u:13853ty8][/quote:13853ty8]

"Just fail if quietest" does exactly that.

[quote="oroussel":13853ty8]
[list:13853ty8]
* a way to "automatically" allocate an event to a waiting object, when an event instance become available (one instance is stopped or become quietest than a waiting sounds)
[/list:u:13853ty8]
[/quote:13853ty8]

You should be able to use callbacks for the case where an instance is stopped. The case where it becomes quietest is more difficult – see the "virtual event" stuff at the end of this post.

[quote="oroussel":13853ty8]
With the current "Max playbacks behavior" and event API available, I’m not satisfy with the way I use to solve this problems:
[list:13853ty8]* "Just fail if quietest" seems to be the response, except that I can not see how it works to evaluate the volume based on the distance and parameter values
[/list:u:13853ty8][/quote:13853ty8]

There was a section in the docs for Event::set3DAttributes about this, but it seems to have been accidentally erased – I will make sure this is fixed in our next release. This is what it said:

[code:13853ty8]
Before getting an event with ‘just fail if quietest’ max playbacks behaviour, this function should be called on an EVENT_INFOONLY event to allow the event system to estimate volume. The various getEvent* functions copy the 3D attributes from the EVENT_INFOONLY event to the event that is returned, so it is not necessary to set the 3D attributes again after getting a real event.
[/code:13853ty8]

So to use "Just fail if quietest", get an event with EVENT_INFOONLY mode, set the 3d attributes appropriately, and then try to get a real event. The "Just fail if quietest" algorithm evaluates the volume based on the attributes of the EVENT_INFOONLY event.

[quote="oroussel":13853ty8][list:13853ty8]
* how to identify events that were stolen ? Until now, I use FMOD_ERR_INVALID_HANDLE error when updating event position or parameter value to decide that the event is stolen.
[/list:u:13853ty8][/quote:13853ty8]

You should be able to use an event callback and FMOD_EVENT_CALLBACKTYPE_STOLEN for this.

[quote="oroussel":13853ty8][list:13853ty8]
* how to re-activate them ? I try to get a new event for active sounds marked as "stolen" each cycle.
[/list:u:13853ty8][/quote:13853ty8]

I don’t understand what you’re trying to do here.

[quote="oroussel":13853ty8]
I do not have a complete solution, but some questions:
[list:13853ty8] * Would it be useful(possible ?) to have something like:
[list:13853ty8]* create a "preview"(preheard ?) event, with all its information: position, speed, orientation, parameters value, … -> that gives its volume
* try to insert it into the pool of events (then, treat failure to activate the event again after a while)
[/list:u:13853ty8][/list:u:13853ty8]
[/quote:13853ty8]

Use "Just fail if quietest" and an EVENT_INFOONLY event for this.

[quote="oroussel":13853ty8][list:13853ty8]
* is it possible to have an explicit FMOD_RESULT value indicating that an event operation has failed due to the fact that this event has been stolen ? I get a generic error FMOD_ERR_INVALID_HANDLE and wanted to start specific treatment for a stolen sound.
[/list:u:13853ty8][/quote:13853ty8]

This may be possible, we will discuss it internally and get back to you.

[quote="oroussel":13853ty8][list:13853ty8]
* would it be possible to integrate the "max playbacks" event aspect inside the virtualization algorithm ? This should be the most easy way for external use, of course !
[/list:u:13853ty8][/quote:13853ty8]

We are currently looking into providing a "virtual event" system, which would work in a similar way to the virtual channel system, and would provide most of the functionality you are talking about. At this stage we cannot give you a timeframe on when this would be implemented, however.

Thanks,
Ben

  • You must to post comments
0
0

Hi,

Thank you for all these responses. I’m still working on it, but I can give complementary elements.

[quote:1t3gt8ie] Ben wrote:
* how to re-activate them ? I try to get a new event for active sounds marked as "stolen" each cycle.

I don’t understand what you’re trying to do here.[/quote:1t3gt8ie]

I’d like to have new instances of sound to be heard when it becomes louder than the quietest. I mean: as all the objects are moving, if one of them is coming closer (or, for example, it’s motor engine starts to do lot of noise), I want to hear this one at the correct position, instead of the quiestest of all the other similar sounds.
-> so I try to start all "stolen" needed events at each cycle

Thanks for your help.

  • You must to post comments
0
0

[quote="oroussel":ewhrenwh]I’d like to have new instances of sound to be heard when it becomes louder than the quietest. I mean: as all the objects are moving, if one of them is coming closer (or, for example, it’s motor engine starts to do lot of noise), I want to hear this one at the correct position, instead of the quiestest of all the other similar sounds.
-> so I try to start all "stolen" needed events at each cycle
[/quote:ewhrenwh]

Ah, I see. This is one of the things the proposed virtual event system would take care of. I don’t think there’s a better way to do this at the moment.

Ben

  • You must to post comments
0
0

[quote="ben":2v10dfbw]Hi,

You should be able to use an event callback and FMOD_EVENT_CALLBACKTYPE_STOLEN for this.

Use "Just fail if quietest" and an EVENT_INFOONLY event for this.


[/quote:2v10dfbw]
OK, using a callback is clearly a good method for this (do not forget to set the callback again, each time a new event instance steals another one).

"Just fail if quietest" and an EVENT_INFOONLY seems to work better … if you use the development version and not the last stable one ! (well, it is described in the revision description, but man has to think about it).
A question though: does-it also take the value parameter of the new instance into account or not ? (in our case, the volume of the sounds is also driven by a rpm parameter)

Thanks,
Olivier

  • You must to post comments
0
0

[quote="oroussel":3qaus045]
"Just fail if quietest" and an EVENT_INFOONLY seems to work better … if you use the development version and not the last stable one ! (well, it is described in the revision description, but man has to think about it).
A question though: does-it also take the value parameter of the new instance into account or not ? (in our case, the volume of the sounds is also driven by a rpm parameter)
[/quote:3qaus045]

Yes, it should take parameter values and any volume envelopes they affect into account.

Ben

  • You must to post comments
0
0

Hi,
I have a problem when trying to use a lot of event instances and set the mindistance/maxdistance of each event instances at runtime.

I have a event(Max playbacks > 1) using by some emitters in my MapEditor,so each emitters has a instance.The problem is I need to set the mindistance/maxdistance of each emitters and check the effect after set in MapEditor at runtime,but event doesn’t have this api(I use FmodEx Stable ).

Therefore I need:

  • Event::set3DMinMaxDistance()

Thank for your help.

  • You must to post comments
Showing 12 results
Your Answer

Please first to submit.