FmodAudio icon indicating copy to clipboard operation
FmodAudio copied to clipboard

MAUI Cross Platform Support

Open Todd442 opened this issue 1 year ago • 9 comments

First off, very cool library!

Wondering if you've explored generating the necessary abstractions for FMOD to support a cross platform implementation?

I've seen posts that talk about using the native FMOD Libs in that manner.

Todd442 avatar Feb 24 '23 17:02 Todd442

This library supports any platform that .NET supports. The only tricky thing I foresee is locating the native binary for FMOD, which I leave up to the OS or the user (via Fmod.SetLibraryLocation())

sunkin351 avatar Feb 24 '23 17:02 sunkin351

You're correct but the code as written will need a OS level abstraction for the FMOD Lib. Having used other libs cross platform, I've had the generate these abstractions for the say the Android version of an API contained in .JAR files. When these are created the APIs exposed may not be named the same on the different platforms once the tooling generates the libs required for .NET

So while your library is "technically" cross platform the calls to the FMOD on other platforms require another layer

If that makes any sense

Todd442 avatar Feb 24 '23 18:02 Todd442

Quick question, what API's specifically are you talking about that I'm using?

Edit: You're gonna have to explain to me what exactly isn't adequate because I'm completely unfamiliar with android development.

sunkin351 avatar Feb 24 '23 19:02 sunkin351

After reviewing your comment further, yes, if the naming scheme of the native methods changes, everything breaks. Idk what I can really do about that.

sunkin351 avatar Feb 24 '23 20:02 sunkin351

The core here is you'd need to include the type abstraction as part of your NUGET and deal with it via compile directives.

Todd442 avatar Feb 27 '23 15:02 Todd442

Maybe I'm stupid, but I'm not following... Could you clarify that further?

sunkin351 avatar Feb 27 '23 16:02 sunkin351

Closed until a solid plan of action can be provided.

sunkin351 avatar Mar 10 '23 02:03 sunkin351

Would like to reopen this after more research.

First a couple clarifications.

In my earlier comment I said the namespaces could be affected by the generation of a "Android Java Library Binding" I was incorrect. The namespace and interfaces are unaffected.

There's a simple walk though for this for another FMOD library (different functionality) found at the link below so you can see the process.

https://github.com/Martenfur/FmodForFoxes

I have followed a similar process with your library and am now receiving an "An error occurred that wasn't supposed to. Contact support."

image

image

image

I can share the code if you'd like to try and resolve the issue.

I have confirmed that this is not related to the libraries not being found.

Todd442 avatar Apr 17 '23 15:04 Todd442

Could you confirm what Error code is being returned from System_Create()?

Also, sorry for the late reply, I've been busy of late.

sunkin351 avatar May 17 '23 03:05 sunkin351