0
0

Hi,

It appears to be that there is no implementation sound group function for the c# version but there is :

private static extern RESULT FMOD_System_CreateSoundGroup (IntPtr system, StringBuilder name, ref SoundGroup soundgroup);
[DllImport (VERSION.dll)]

Im not sure if this has been sorted out in the latest version of fmod, currently im using the 4.24.09 Stable branch.

Has anyone implemented this fucntion call that works? It would be very useful because i am currently not able to update the fmod version due to certain reasons.

I also try implementing it as well. Im just unsure about the StringBuilder variable.

thanks, lee

  • You must to post comments
0
0

There have been recent improvements to the C# headers in newer versions however if you cannot update that is a problem. I will paste the implementation code you are missing below, it belongs in the System class.

[code:k4szrfx7]
public RESULT createSoundGroup (string name, ref SoundGroup soundgroup)
{
RESULT result = RESULT.OK;
IntPtr soundgroupraw = new IntPtr();
SoundGroup soundgroupnew = null;

try
{
    result = FMOD_System_CreateSoundGroup(systemraw, name, ref soundgroupraw);
}
catch
{
    result = RESULT.ERR_INVALID_PARAM;
}
if (result != RESULT.OK)
{
    return result;
}

if (soundgroup == null)
{
    soundgroupnew = new SoundGroup();
    soundgroupnew.setRaw(soundgroupraw);
    soundgroup = soundgroupnew;
}
else
{
    soundgroup.setRaw(soundgroupraw);
}

return result;

}
[/code:k4szrfx7]

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.