Here is the dirt simplest way. Just install a cache between the parameters
public static class FmodFix
{
private static Dictionary<string, byte[]> StringTable = new Dictionary<string, byte[]>();
public static byte[] Encode(string name)
{
byte[] results;
if (!StringTable.TryGetValue(name, out results))
{
results = Encoding.UTF8.GetBytes(name + Char.MinValue);
StringTable[name] = results;
}
return results;
}
}
public RESULT setParameterValue(string name, float value)
{
return FMOD_Studio_EventInstance_SetParameterValue(rawPtr, FmodFix.Encode(name), value);
}