diff options
author | David Robillard <d@drobilla.net> | 2007-08-02 21:08:18 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-08-02 21:08:18 +0000 |
commit | 53415b270cfde019f8e8dcdad370439dee46b590 (patch) | |
tree | e0e5269ab5b86e802f49a2c8603a36985a111fb9 /libs/ardour/meter.cc | |
parent | 89b6edb0ce6367caf8cd453abc3565853fe6da85 (diff) |
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
Diffstat (limited to 'libs/ardour/meter.cc')
-rw-r--r-- | libs/ardour/meter.cc | 3 |
1 files changed, 1 insertions, 2 deletions
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 <ardour/peak.h> #include <ardour/dB.h> #include <ardour/session.h> -#include <ardour/midi_events.h> 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) |