martindevans / SupersonicSound

C# Wrapper For FMOD Studio
Other
29 stars 9 forks source link

Update fmod to the 2.0 version #35

Open sanslash332 opened 5 years ago

sanslash332 commented 5 years ago

Is possible do a direct update of the wraper to make it compatible with the new 2.0 fmods api?

I tried to use it with the new dlls (without recompiling it) but supersonicsound throws an invalid parameter exception when you try to initialize the lowlevelSystem instance.

So if is possible update it without mutch work, please do it, or tell me if is possible recompiling it :)

:)

thanks in advance!

martindevans commented 5 years ago

I haven't looked into the new FMOD 2.0 APIs at all, so I can't be certain.

However in general for past updates of SupersonicSound to new FMOD versions it's been fairly simple. FMOD themselves provide a very basic C# wrapper (you can see our copy of that in this folder: https://github.com/martindevans/SupersonicSound/tree/master/SupersonicSound/Wrapper/Fmod). If they still supply that with FMOD 2.0 you should drop it into that folder, that should cause a load of compiler errors in the C# source which you can fix and once that process is complete it should all work.

Obviously there may be some incompatibilities if FMOD2.0 is a major API redesign, in which case it may be quite a lot of work to fix up!

sanslash332 commented 5 years ago

Hello!

I've tried to do that (droping in the folder the new (call it cs headers xd)), but...

The compilation was fine, without any special error, compiler warning or something similar; the dll was created correctly.

But, when I launch the console example (previously dropping on /dependencies/x86/ the new fmod's dlls) when the console tried to initialize the fmod engine (with any of the three options) the program threw an invalid parameter exception pointing to the lowLevel engine initializing line.

So, I think that the parameters for start the engine in the new version need something different or... well.

Please if you can, give to it a better check; you know with more details the api and the wrapper. :)

For now I'll try to compile with the 1.10.12 version.

thanks for all!

awesome the wrapper!

martindevans commented 5 years ago

Could you give me the details on the error you encountered, I'll try to find some time to look into it :)

sanslash332 commented 5 years ago

@martindevans Sorry, the error wasn't so simple as I thought.

Simply dropping the new headers, some fixes that is necesari to make are, remove some removed flags on the headers, for output, mode, and one more that i can't remember now. I can Fix them only commenting them, but the other two are missed references to ParameterInstance in fmod.studio and to ChannelControl in Fmod.

I can't find ParameterInstance on the new headers; I don't have idea if that was changed, removed or something similar for the 2.0 version.

Same for ChannelControl. Aparentli only these two are clear problems :)

I tried to make some changes, but. the result was worst than the previous errors jaja.

Thanks!