Develop plugins usable on the Oculus Quest 2 / Android

Hello,

I’m a Vst and VCV plugin developer and I’m starting to develop FMOD plugins.
I get my first basic plugin working(nothing fancy just a mute and audio level), I am very excited about that and am looking forward to develop more advanced stuff based on the code I have developed for Vst/VCV plugins.

It was pretty easy to build my first plugin by following the examples and using the FMOD Studio Plug-in SDK, thanks to fmod for that :slight_smile:

The only question left is why do I need to add a ‘’#pragma warning(disable : 4996)’’ which is not added to the provided examples plugins in order to avoid error 4996. (not a big deal but I wonder why)

This said, most of the time I am working with fmod for projects running on oculus quest (and am using unity) so I would like to offer plugins working for this.

From what I’ve understood, since oculus is using the android platform, the plugins have to be .so files (like those for the oculus spatializer in plugins/FMOD/platroms/android/lib) which are completely different from .dll or .lib files (dynamic libraries) generated to run on the FMOD studio.

So, I get two questions:

  • Since the fmod native plugins are able to work on the oculus, I wonder if they are containing a .so file that is automatically linked correclty when building for android/oculus? or does it exists a way (similar to the one used for the native plugins) to develop my fmod plugins in order to avoid the development of an additional .so plugin?

  • If the .so developing is needed, does it exists a guide about how to develop a .so plugins based on plugins developed for fmod? (Or a quick explanation about how this all works to get a good starting point because I don’t understand at all where to start my researches about that).

Thank you very much in advance.

I haven’t hit any C4996 errors when building the examples, what version of FMOD are you using, and can you please share the log you are getting if you don’t disable it?

In Unity, you can load the plugin as a Static Plugin to avoid needing to compile different dynamic libraries for each platform. You can also use the Core API to load the cpp source files yourself using System.loadPlugin

If you wanted to use dynamic libraries, we don’t have an official guide, but you can try compiling a .so with Linux or cross-compiling on Windows, I think a static plugin would be the easiest though.

Thank you very much for your answers.

I will go for the static library solution.

I’m using fmod 2.02.05.

Concerning the error 4996 it seems due to some function on strings that are used by FMOD_DSP_INIT_PARAMDESC_FLOAT(_pramStruct, _name, _label, _description, _min , _max , _default)

Blockquote
‘sprintf’: This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. madtrixPlugin C:\Users\wolfi\source\repos\fmod plugin\fmod plugin\dllmain.cpp

Blockquote
‘strncpy’: This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.|madtrixPlugin|C:\Users\wolfi\source\repos\fmod plugin\fmod plugin\dllmain.cpp|246||