0
0

Okay, some questions that are hopefully trivially answered:

  1. Is there a method of getting the index of an event/group from the name? I can get the name from the index, but not vice-versa without parsing the output from the sound designer tool. It would be nice to get this in code, so I can look up by name the first time and by index subsequent times.

  2. Does releasing a group release all groups below it? The documentation states that it releases all the events created under it, but says nothing about child groups. For example, if I want an event “ambients/birds/cardinal”, and I release the “ambients” group, will it release the “birds” group and “cardinal” event, too?

  3. Is there any method of auto-releasing an event or channel (I assume they stick around after they are finished playing) other than iterating over a list of currently playing channels and events and releasing those that are done?

Thanks!

Jeff M.

  • You must to post comments
0
0

[quote="jeffm":3v1ytmz1]1. ….It would be nice to get this in code, so I can look up by name the first time and by index subsequent times.[/quote:3v1ytmz1]

Just to explain this a little more, if I have a file that contains weapon definitions, it might have something to the effect of:

[code:3v1ytmz1]<weapon name="shotgun">
<reload_sound>shutgun_rld_01</reload_sound>
</weapon>[/code:3v1ytmz1]

Now, when parsing in this I’d like to get the event with the sound, but not store the string (waste of memoy and speed). I’d like to have a structure:

[code:3v1ytmz1]struct weapons {
int reload_sound;
};[/code:3v1ytmz1]

And from there on be able to play a sound using the index.

Jeff M.

  • You must to post comments
0
0

[quote="brett":2z072nwm][quote="jeffm":2z072nwm]Okay, some questions that are hopefully trivially answered:

  1. Is there a method of getting the index of an event/group from the name? I can get the name from the index, but not vice-versa without parsing the output from the sound designer tool. It would be nice to get this in code, so I can look up by name the first time and by index subsequent times.
    [/quote:2z072nwm]

Not now but i’ll add this for this week’s release.[/quote:2z072nwm]

Currently this is more important than the other two. I figure it’s a trivial feature. Thanks, Brett.

Jeff M.

  • You must to post comments
0
0

[quote="brett":302310it]hi jeff i’ve already added it, we’ll aim to do a version on monday.[/quote:302310it]

Thanks, Brett!

Just curious, before you release it, how was it implemented. The two immediate methods that come to mind would be:

[code:302310it]int idx = my_fmod_group->getEventIndexFromName(name);[/code:302310it]

or

[code:302310it]int idx = my_fmod_event->getIndex();[/code:302310it]

The former is much preferred (I would assume), because you don’t need to open the event (allocate memory) and then immediately release it.

Jeff M.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.