public void Write(PmTimestamp when, PortMidiMessage msg) { var ret = PortMidiMarshal.Pm_WriteShort(stream, when, msg); if (ret != PmError.NoError) { throw new PortMidiException(ret, String.Format("Failed to write message {0} : {1}", msg.Value, PortMidiMarshal.Pm_GetErrorText((PmError)ret))); } }
public static extern PmError Pm_WriteShort(IntPtr stream, PmTimestamp when, PortMidiMessage msg);