|
From: Lasse Kärkkäi. <tr...@us...> - 2011-02-25 19:17:27
|
Author: Lasse Kärkkäinen <tronic+ndrm at trn.iki.fi> Date: Fri Feb 25 20:16:32 2011 +0100 Fix typo in midifile --- midifile.cc | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/midifile.cc b/midifile.cc index afee1ca..a1240cd 100644 --- a/midifile.cc +++ b/midifile.cc @@ -123,7 +123,7 @@ void Writer::startTrack() { void Writer::writeEvent(Event const& ev) { write_varlen(ev.timecode); if (ev.type & ~0xF0 || ev.type < 0x80) throw std::logic_error("Invalid MIDI event type"); - if (ev.type & ~0x0F) throw std::logic_error("Invalid MIDI channel number"); + if (ev.channel & ~0x0F) throw std::logic_error("Invalid MIDI channel number"); write<1>(ev.type | ev.channel); if (ev.type != Event::SPECIAL || ev.channel >= 8) write<1>(ev.arg1); // Everything except System Common takes one argument switch (ev.type) { |