From 46e2d9f0ad5ae2695bcf42e7e9e6866c20182dd2 Mon Sep 17 00:00:00 2001 From: petern Date: Tue, 21 Jul 2009 21:44:16 +0000 Subject: [PATCH] -Handle all notes off in notecache. git-svn-id: http://svn.fuzzle.org/mloop/mloop/trunk@4 ba049829-c6ef-42ef-81ac-908dd8d2e907 --- src/notecache.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/notecache.h b/src/notecache.h index 1ded8e1..6b2c906 100644 --- a/src/notecache.h +++ b/src/notecache.h @@ -45,6 +45,10 @@ public: if ((cmd & 0xF0) == 0x80) velocity = 0; m_notes[channel][note] = velocity; } + } else if ((cmd & 0xF0) == 0xB0 && buffer[1] == 0x7B) { + /* All notes off */ + int8_t channel = cmd & 0x0F; + memset(m_notes[channel], 0, sizeof m_notes[channel]); } } };