Example #1
0
 public void SetEffectParameters(int effectIndex, VolumeMeterLevels meterLevels, int operationSet = 0)
 {
     unsafe
     {
         IntPtr effectParameterPtr = Marshal.AllocHGlobal(sizeof(VolumeMeterLevels.__Native));
         _effectParameters.Add(effectParameterPtr);
         VolumeMeterLevels.__Native native = default;
         meterLevels.__MarshalTo(ref native);
         Unsafe.CopyBlockUnaligned(effectParameterPtr.ToPointer(), &native, (uint)sizeof(VolumeMeterLevels.__Native));
         SetEffectParameters(effectIndex, effectParameterPtr, sizeof(VolumeMeterLevels.__Native), operationSet);
     }
 }
Example #2
0
 public unsafe Result SetEffectParameters(int effectIndex, VolumeMeterLevels meterLevels, int operationSet = 0)
 {
     VolumeMeterLevels.__Native native = default;
     meterLevels.__MarshalTo(ref native);
     return SetEffectParameters(effectIndex, new IntPtr(&native), sizeof(VolumeMeterLevels.__Native), operationSet);
 }