From 61f587cfc6f151570df169ae38158b6293aaddb8 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 3 Mar 2020 19:19:01 +0100 Subject: add go-modules support and fix midi library API change --- pkg/controller/controller.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'pkg/controller/controller.go') diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index 2aa8023..dfb6d7d 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -162,11 +162,13 @@ func (c *Controller) Init() error { go func() { for { - p := <-ch - if p.Err != nil { - c.Shutdown() + ps := <-ch + for _, p := range ps { + if p.Err != nil { + c.Shutdown() + } + c.handleMidiPacket(p) } - c.handleMidiPacket(p) } }() return nil -- cgit v1.2.3