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

Loading Plugins #269

Open
sydastry opened this issue Oct 31, 2024 · 5 comments
Open

Loading Plugins #269

sydastry opened this issue Oct 31, 2024 · 5 comments

Comments

@sydastry
Copy link

Hello!
(Sorry in advance if this isn't the right place for this)
I am using FMOD's new CoreAPI wrapper to create FMOD plugins for our game in Godot. It's working fine on the studio end, but Godot is unable to recognize the bank and is giving the following error:
core/variant/variant_utility.cpp:1092 - A requested output, dsp unit type or codec was not available.class godot::Ref __cdecl godot::FmodCache::add_bank(const class godot::String &,unsigned int)src\fmod_cache.cpp47

I asked in the FMOD forums, and they said I'd need to load the built plugin library at runtime, after initialization and before the bank using the plugin is called, "by retrieving the Core API system with Studio::System::getCoreSystem and calling System::loadPlugin 1 with the Core system to load the plugin from the specified path."

They also said they were uncertain if fmod-gdextension has a way of handling plugin loading already.

Does the extension have a way of handling plugin loading? If not, can I maybe get some insight on where to even begin with this? I'm still relatively new to programming and feel a bit in over my head here!
Thanks!!

@CedNaru
Copy link
Member

CedNaru commented Oct 31, 2024

This extension doesn't have a mechanism to load plugins yet.
It has been requested by several people, and we are currently working on a new update, so loading plugins should be part of the next release (should be in a few weeks).
If you create your own plugins for FMOD, you will have to build it as a dynamic library, put it in a specific directory of your Godot project and call a new method we will add to the FmodServer.

@sydastry
Copy link
Author

Ah, good to know! Thank you, I'll keep my eyes peeled for the update.

@sydastry
Copy link
Author

sydastry commented Dec 3, 2024

Any updates on this/a rough estimate on when we can expect to see this added? Sorry to be a pest, it's been a few weeks and this is critical to a project I'm working on so I'm just trying to keep tabs/possibly find a workaround!

@sydastry sydastry reopened this Dec 13, 2024
@sydastry
Copy link
Author

Hi! I was looking at the new release and noticed I didn't see the plugin loading you mentioned anywhere. Am I missing something or will we have to wait a bit longer?

@CedNaru
Copy link
Member

CedNaru commented Dec 13, 2024

We couldn't implement in time for the new release in the end. We had to delay it for the one after because the end of the year is coming, and we wanted at least to release something before getting busy with holidays.
For the technical reason:
We have internally a draft of it that works but only when using the Godot editor, once you export it becomes more complicated because the files (and so plugins) are put in the Godot PCK and are no longer visible to FMOD.
FMOD provide an API that allow to provide a custom file reading using Godot to it, but it seems to only work when loading banks/events but is not used when loading plugins.
Now we have to implement an export plugin so FMOD plugins are exported next to Godot files, not inside, but the implementation also depends on the platform (you don't handle Desktop, Android and iOS the same way).

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