public void Start() { if (running) throw new Exception("Input is already started"); timeCallback = PortMidi.Pt_Time; var err = PortMidi.Pm_OpenInput(out stream, deviceId, (IntPtr)0, 128, timeCallback, (IntPtr)0); running = true; insideSysexMessage = false; this.thread = new Thread(Listen) { IsBackground = true }; thread.Start(); }
public void Start() { if (running) { throw new Exception("Input is already started"); } timeCallback = PortMidi.Pt_Time; var err = PortMidi.Pm_OpenInput(out stream, deviceId, (IntPtr)0, 128, timeCallback, (IntPtr)0); running = true; insideSysexMessage = false; this.thread = new Thread(Listen) { IsBackground = true }; thread.Start(); }