diff options
author | Hans Baier <hansfbaier@googlemail.com> | 2008-05-21 23:01:40 +0000 |
---|---|---|
committer | Hans Baier <hansfbaier@googlemail.com> | 2008-05-21 23:01:40 +0000 |
commit | 7a9b4a0aa2f5ccdcd9257a0df12917c0e3b1fd91 (patch) | |
tree | 77f80e68cda1f359dabc6ac4fe2721827a207088 /libs/ardour/midi_model.cc | |
parent | 96384d65a67648fcbf617d2cea1fdd47b907c112 (diff) |
* bugfix: Inputs and Outputs swapped in the Track/Bus Inspector
* bugfix: control_to_midi_event has no effect
* typo (track/bus inspector)
git-svn-id: svn://localhost/ardour2/branches/3.0@3379 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/midi_model.cc')
-rw-r--r-- | libs/ardour/midi_model.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libs/ardour/midi_model.cc b/libs/ardour/midi_model.cc index d01bf4276b..02b076a5e5 100644 --- a/libs/ardour/midi_model.cc +++ b/libs/ardour/midi_model.cc @@ -59,13 +59,14 @@ void MidiModel::read_unlock() const { MidiModel::const_iterator::const_iterator(const MidiModel& model, double t) : _model(&model) - , _is_end( (t == DBL_MAX) || model.empty()) - , _locked( !_is_end) + , _is_end( (t == DBL_MAX) || model.empty() ) + , _locked( !_is_end ) { //cerr << "Created MIDI iterator @ " << t << " (is end: " << _is_end << ")" << endl; - if (_is_end) + if (_is_end) { return; + } model.read_lock(); @@ -286,8 +287,9 @@ MidiModel::const_iterator& MidiModel::const_iterator::operator=(const const_iter size_t index = other._control_iter - other._control_iters.begin(); _control_iter = _control_iters.begin() + index; - if (!_is_end) + if (!_is_end) { _event = boost::shared_ptr<MIDI::Event>(new MIDI::Event(*other._event, true)); + } return *this; } @@ -355,11 +357,12 @@ size_t MidiModel::read(MidiRingBuffer& dst, nframes_t start, nframes_t nframes, * \return true on success */ bool -MidiModel::control_to_midi_event(boost::shared_ptr<MIDI::Event> ev, const MidiControlIterator& iter) const +MidiModel::control_to_midi_event(boost::shared_ptr<MIDI::Event>& ev, const MidiControlIterator& iter) const { assert(iter.automation_list.get()); - if (!ev) + if (!ev) { ev = boost::shared_ptr<MIDI::Event>(new MIDI::Event(0, 3, NULL, true)); + } switch (iter.automation_list->parameter().type()) { case MidiCCAutomation: |