Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why the artificial event limit? MAX_EVENT_COUNT 256 #152

Open
michaelhartung opened this issue Apr 6, 2023 · 5 comments
Open

Why the artificial event limit? MAX_EVENT_COUNT 256 #152

michaelhartung opened this issue Apr 6, 2023 · 5 comments

Comments

@michaelhartung
Copy link

michaelhartung commented Apr 6, 2023

Hi,

Is there a specific reason why this integration limits the number of events a bank can hold to 256?

It took me a bit to track down why my banks where not loading all of the contained events :).

I could have probably found the reason earlier if the log in the CHECK_SIZE macro would have actually showed up in Godots Output Log, but it didn't because Godot 3.5 doesn't like getting hammered with log messages.

image

Some more context, I'm working on a narative game and we will have some ~3500 vo events alone.

Ideally we would have liked to use FMOD programmer instruments but this feature doesn't seem supported by this integration. For now I just created a bunch of smaller banks to work around this limit, but before I fork and adjust this myself I wanted to understand why this limit exists in the first place :).

Many thanks in advance,
Michael

@CedNaru
Copy link
Member

CedNaru commented Apr 10, 2023

Hi,
The upper limit can be increased. It's just that I need to provide FMOD with an array of a fixed size when querying the events, so I picked 256 as a base size, assuming that the total numbers of events would be split into smaller banks anyway.

So yeah, just to be clear, the max number doesn't have to be 256, but I still need to set an upper limit (and obviously I won't allocate a 4GB array for that).

@CedNaru
Copy link
Member

CedNaru commented Apr 10, 2023

Btw, what is the programmer instruments feature you are talking about ?

@michaelhartung
Copy link
Author

Thanks for the response!

Programmer instruments are special "instruments" that you can add to an event, that allow you to load audio files "into events" at runtime and have them play "through" that event (including the group mixer, fx, etc.).

Their main usage is for voice over (localisation) and to avoid having to create/manage gigantic banks for that. They require certain callbacks that don't seem to be available by this implementation.

[1] https://www.fmod.com/docs/2.02/studio/glossary.html#programmer-instrument
[2] https://www.fmod.com/docs/2.02/api/studio-api-eventinstance.html#fmod_studio_programmer_sound_properties
[3] https://www.fmod.com/docs/2.02/api/studio-guide.html#dialogue-and-localization

@CedNaru
Copy link
Member

CedNaru commented Apr 11, 2023

I see, I'll add this on the list of features to add to that plugin. But from now, works for this plugin shift to Godot 4.x so I don't really plan to add this to the Godot 3.x version.
I can raise the event limit for Godot 3.x if you wish, but it's unlikely that I add programmer instruments for it.

@michaelhartung
Copy link
Author

Thank you!

In case you don't want the raised limit to make into your repo I can just do a fork for the project I'm working on and adjust to our needs (and maybe tackle the programmer instrument support if time permits).

And just in case you're not aware, there is a fairly complete FMOD implementation for Godot 4 available:

https://github.com/alessandrofama/fmod-for-godot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants