public void SetParam([MarshalAs(UnmanagedType.I4)] Mpg123Params type, long value = 0, double fvalue = 0) { int setParam = NativeMethods.NativeMpg123SetParam(handle, type, (IntPtr)value, fvalue); if ((Errors)setParam != Errors.OK) { throw new ErrorException((Errors)setParam); } }
public void GetParam([MarshalAs(UnmanagedType.I4)] Mpg123Params type, ref long value, ref double fValue) { IntPtr paramValue = IntPtr.Zero; double paramFValue = 0; int getParam = NativeMethods.NativeMpg123GetParam(handle, type, ref paramValue, ref paramFValue); if ((Errors)getParam != Errors.OK) { throw new ErrorException((Errors)getParam); } value = (long)paramValue; fValue = paramFValue; }