0
0

There are errors in [b:3sbir2s4]fmod.cs[/b:3sbir2s4] (wrapper) in declarations of functions:
[b:3sbir2s4]
getReverbProperties
setReverbProperties
getReverbAmbientProperties
setReverbAmbientProperties
[/b:3sbir2s4]

These declarations are invalid and do nothing or cause of fault:

[i:3sbir2s4]

    public RESULT setReverbProperties    (ref REVERB_PROPERTIES prop)       
    {
        return FMOD_System_SetReverbProperties(systemraw, ref prop);            
    }

    public RESULT getReverbProperties    (ref REVERB_PROPERTIES prop)       
    {
        return FMOD_System_GetReverbProperties(systemraw, ref prop);            
    }

    public RESULT setReverbAmbientProperties(ref REVERB_PROPERTIES prop)
    {
        return FMOD_System_SetReverbAmbientProperties(systemraw, ref prop);
    }

    public RESULT getReverbAmbientProperties(ref REVERB_PROPERTIES prop)
    {
        return FMOD_System_GetReverbAmbientProperties(systemraw, ref prop);         
    }


[DllImport(VERSION.dll)]
private static extern RESULT FMOD_System_SetReverbProperties (IntPtr system, ref REVERB_PROPERTIES prop);
[DllImport(VERSION.dll)]
private static extern RESULT FMOD_System_GetReverbProperties (IntPtr system, ref REVERB_PROPERTIES prop);
[DllImport(VERSION.dll)]
private static extern RESULT FMOD_System_SetReverbAmbientProperties(IntPtr system, ref REVERB_PROPERTIES prop);
[DllImport(VERSION.dll)]
private static extern RESULT FMOD_System_GetReverbAmbientProperties(IntPtr system, ref REVERB_PROPERTIES prop);

[/i:3sbir2s4]

Because of REVERB_PROPERTIES is a [b:3sbir2s4]class[/b:3sbir2s4], not [b:3sbir2s4]struct[/b:3sbir2s4] declarations should be declared as:

[i:3sbir2s4]
public RESULT setReverbProperties (REVERB_PROPERTIES prop)
{
return FMOD_System_SetReverbProperties(systemraw, prop);
}

    public RESULT getReverbProperties    (REVERB_PROPERTIES prop)
    {
        return FMOD_System_GetReverbProperties(systemraw, prop);
    }

    public RESULT setReverbAmbientProperties (REVERB_PROPERTIES prop)
    {
        return FMOD_System_SetReverbAmbientProperties(systemraw, prop);
    }
    public RESULT getReverbAmbientProperties (REVERB_PROPERTIES prop)
    {
        return FMOD_System_GetReverbAmbientProperties(systemraw, prop);
    }

….

    [DllImport(VERSION.dll)]        
    private static extern RESULT FMOD_System_SetReverbProperties(IntPtr system, [In, Out] REVERB_PROPERTIES prop);
    [DllImport (VERSION.dll)]
    private static extern RESULT FMOD_System_GetReverbProperties(IntPtr system, [In, Out] REVERB_PROPERTIES prop);
    [DllImport (VERSION.dll)]
    private static extern RESULT FMOD_System_SetReverbAmbientProperties(IntPtr system, [In, Out] REVERB_PROPERTIES prop);
    [DllImport (VERSION.dll)]
    private static extern RESULT FMOD_System_GetReverbAmbientProperties(IntPtr system, [In, Out] REVERB_PROPERTIES prop);

[/i:3sbir2s4]

Read PInvoke MS documents for details of marshalling classes and structs.

  • You must to post comments
0
0

Another amazing thing i’ve found :) :

Class Reverb is declared inside class Geometry. And has no methods to create it (there must have createReverb method in wrapper).

The more i use it, the more i like it :)

And there are some marshalling bugs in Reverb methods.

  • You must to post comments
0
0

Thanks for the info on those problems, we will get that fixed up for our next release.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.