From 53415b270cfde019f8e8dcdad370439dee46b590 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 2 Aug 2007 21:08:18 +0000 Subject: Little MidiEvent prettification additions, ifdef'd non-realtime aspects (for future purposes). Fix MIDI recording crash bug. git-svn-id: svn://localhost/ardour2/trunk@2228 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/meter.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libs/ardour/meter.cc') diff --git a/libs/ardour/meter.cc b/libs/ardour/meter.cc index 74a3e61f9a..6ea5a30920 100644 --- a/libs/ardour/meter.cc +++ b/libs/ardour/meter.cc @@ -23,7 +23,6 @@ #include #include #include -#include namespace ARDOUR { @@ -49,7 +48,7 @@ PeakMeter::run (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nfr // expressed through peaks alone for (MidiBuffer::iterator i = bufs.get_midi(n).begin(); i != bufs.get_midi(n).end(); ++i) { const MidiEvent& ev = *i; - if ((ev.buffer()[0] & 0xF0) == MIDI_CMD_NOTE_ON) { + if (ev.is_note_on()) { const float this_vel = log(ev.buffer()[2] / 127.0 * (M_E*M_E-M_E) + M_E) - 1.0; //printf("V %d -> %f\n", (int)((Byte)ev.buffer[2]), this_vel); if (this_vel > val) -- cgit v1.2.3