diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-06-01 20:40:45 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-06-01 20:40:45 +0000 |
commit | 0cd3bd4f194439a047f8ab6b7baaf38d118a1d85 (patch) | |
tree | bbe9330496bc8ed4fa44a8a4ebaf16844571281d /libs/ardour/smf_source.cc | |
parent | df99f3704731306170c15ef4f99caca7312e1df1 (diff) |
rationale pathways that add notes to Sequence<T> so that there is only final insertion step; when changing note properties that affect "indexing" within a Sequence<T> (i.e. via set<T,comparator> indexing/ordering/hashing), remove the note and add it back so that indexing stays consistent; fix marshalling of MidiModel::DiffCommand (boost::bind(&Object::method, reference_to_object) will COPY the reference, so use a pointer); fix MidiModel::find_note() to compare note properties not pointer addresses
git-svn-id: svn://localhost/ardour2/branches/3.0@7203 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/smf_source.cc')
-rw-r--r-- | libs/ardour/smf_source.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libs/ardour/smf_source.cc b/libs/ardour/smf_source.cc index 761868f29e..99d0e8c5e6 100644 --- a/libs/ardour/smf_source.cc +++ b/libs/ardour/smf_source.cc @@ -299,7 +299,7 @@ SMFSource::append_event_unlocked_beats (const Evoral::Event<double>& ev) _write_data_count += ev.size(); if (_model) { - _model->append(ev); + _model->append (ev); } } @@ -338,7 +338,7 @@ SMFSource::append_event_unlocked_frames (const Evoral::Event<nframes_t>& ev, sfr const double ev_time_beats = converter.from(ev.time()); const Evoral::Event<double> beat_ev( ev.event_type(), ev_time_beats, ev.size(), (uint8_t*)ev.buffer()); - _model->append(beat_ev); + _model->append (beat_ev); } } @@ -439,9 +439,10 @@ SMFSource::load_model (bool lock, bool force_reload) if (ret > 0) { // didn't skip (meta) event ev.set_event_type(EventTypeMap::instance().midi_event_type(buf[0])); +#ifndef NDEBUG std::string ss; - for (int xx = 0; xx < size; ++xx) { + for (uint32_t xx = 0; xx < size; ++xx) { char b[8]; snprintf (b, sizeof (b), "0x%x ", buf[xx]); ss += b; @@ -449,8 +450,9 @@ SMFSource::load_model (bool lock, bool force_reload) DEBUG_TRACE (DEBUG::MidiSourceIO, string_compose ("SMF %6 load model delta %1, time %2, size %3 buf %4, type %5\n", delta_t, time, size, ss , ev.event_type(), name())); +#endif - _model->append(ev); + _model->append (ev); } if (ev.size() > scratch_size) { |