예제 #1
0
파일: stream.go 프로젝트: rakyll/portmidi
// WriteShort writes a MIDI event of three bytes immediately to the output stream.
func (s *Stream) WriteShort(status int64, data1 int64, data2 int64) error {
	evt := Event{
		Timestamp: Timestamp(C.Pt_Time()),
		Status:    status,
		Data1:     data1,
		Data2:     data2,
	}
	return s.Write([]Event{evt})
}
예제 #2
0
// Returns the portmidi timer's current time.
func Time() Timestamp {
	return Timestamp(C.Pt_Time())
}