I need to use multiple inputs and outputs,
Whatever I try to get advanced settings, it doesn’t work.
Yes, I have to set [i:17w4pz4z].cbsize[/i:17w4pz4z] prior calling this function, which should be 60 but it still doesn’t work.
As [i:17w4pz4z]sizeof[/i:17w4pz4z] only works for unmanaged types, [i:17w4pz4z]Marshal.SizeOf[/i:17w4pz4z] does the trick.
I have also tried using [i:17w4pz4z]StructLayout[/i:17w4pz4z] attribute, giving also sizes to each field in ADVANCEDSETTINGS but still nothing.
Always getting that ERR_INVALID_PARAM …
I have been using FMOD for years and would like to do still, please help !
Thank you 😀
- aybe asked 10 years ago
You need to memset the structure to zero. The values you haven’t set might be non-zero and therefore trying to change settings to arbitrary values. If you cant memset, you can manually set all values you aren’t interested in to zero. We’re are considering removing this manual step as it seems to cause quite a bit of confusion. However, for now it is necessary.
Hope this helps,
- I have tried to change all values to zeroes,
- I have been looking at the C++ samples but there’s no usage of it,
- As the C# wrapper is not up to date, I have tried to update ADVANCEDSETTINGS class to reflect the one in the C++ code
But it doesn’t work too (always ERR_INVALID_PARAM).
In fact, I’m trying to get the advanced settings, not setting them.
I thought it’d be a breeze but it’s not,
Any idea ?
Thank you !
- aybe answered 10 years ago
[quote:334ctbij]In fact, I’m trying to get the advanced settings, not setting them. [/quote:334ctbij]
It is still important to make sure unwanted values are zero because these structs often contain array pointers which will be written to if the size parameter for that array is non-zero.
It sounds like your struct is out of date. This is the whole purpose of the cbsize parameter. If there has been a new member added to the struct then it wont be compatible with the old version.
Please login first to submit.