* 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
This commit is contained in:
Hans Baier
2008-05-21 23:01:40 +00:00
parent 96384d65a6
commit 7a9b4a0aa2
4 changed files with 22 additions and 19 deletions

View File

@@ -200,7 +200,7 @@ public:
const MidiSource* midi_source() const { return _midi_source; }
void set_midi_source(MidiSource* source) { _midi_source = source; }
bool control_to_midi_event(boost::shared_ptr<MIDI::Event> ev, const MidiControlIterator& iter) const;
bool control_to_midi_event(boost::shared_ptr<MIDI::Event>& ev, const MidiControlIterator& iter) const;
private:
friend class DeltaCommand;

View File

@@ -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: