public void SendBufferInternal(IBuffer midiBuffer, TimeSpan timestamp) { if (this.Log().IsEnabled(LogLevel.Debug)) { this.Log().LogDebug($"Sending MIDI buffer to port {_portInfo.PortNumber}"); } if (_midiPort == null) { throw new InvalidOperationException("Output port is not initialized."); } var data = midiBuffer.ToArray(); _midiPort.Send(data, 0, data.Length, timestamp.Ticks); }
public void Send(byte [] mevent, int offset, int length, long timestamp) { // We could return Task.Run (), but it is stupid to create a Task instance for that on every call to this method. port.Send(mevent, offset, length, timestamp); }
public void Send(byte [] mevent, int offset, int length, long timestamp) { port.Send(mevent, offset, length, timestamp); }