diff options
author | David Robillard <d@drobilla.net> | 2009-02-01 21:04:12 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-02-01 21:04:12 +0000 |
commit | 44ac5f5097af43ec6bf60489d73a532f43702bf3 (patch) | |
tree | 03e859a131be8e9187f5a95fb7eba813f9d761eb /libs/ardour/smf_source.cc | |
parent | 554d46896bf60fdf0804225acb26a9fd79e592c4 (diff) |
Removed fixed/maximum event size assumption/limitation from MIDI buffer.
git-svn-id: svn://localhost/ardour2/branches/3.0@4471 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/smf_source.cc')
-rw-r--r-- | libs/ardour/smf_source.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/ardour/smf_source.cc b/libs/ardour/smf_source.cc index d379d52a3d..978192dc0a 100644 --- a/libs/ardour/smf_source.cc +++ b/libs/ardour/smf_source.cc @@ -266,11 +266,13 @@ SMFSource::write_unlocked (MidiRingBuffer& src, nframes_t cnt) void SMFSource::append_event_unlocked(EventTimeUnit unit, const Evoral::Event& ev) { - if (ev.size() == 0) + if (ev.size() == 0) { + cerr << "SMFSource: Warning: skipping empty event" << endl; return; + } - /*printf("SMFSource: %s - append_event_unlocked chan = %u, time = %lf, size = %u, data = ", - name().c_str(), (unsigned)ev.channel(), ev.time(), ev.size()); + /*printf("SMFSource: %s - append_event_unlocked time = %lf, size = %u, data = ", + name().c_str(), ev.time(), ev.size()); for (size_t i=0; i < ev.size(); ++i) { printf("%X ", ev.buffer()[i]); } |