* 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:
@@ -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;
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user