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