* make MIDI-specific menu show up on all MIDI lanes

* style guide, comments and a little refactoring (remove duplication)


git-svn-id: svn://localhost/ardour2/branches/3.0@4422 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Hans Baier 2009-01-21 10:20:27 +00:00
parent 33852a0728
commit 5309c327ec
7 changed files with 52 additions and 33 deletions

View file

@ -770,6 +770,7 @@ ControlList::unlocked_eval (double x) const
if (x >= _events.front()->when) {
return _events.front()->value;
} else {
// hansfbaier: v--------- Why commented ???
// return _default_value;
return _events.front()->value;
}
@ -780,6 +781,7 @@ ControlList::unlocked_eval (double x) const
} else if (x == _events.front()->when) {
return _events.front()->value;
} else if (x < _events.front()->when) {
// hansfbaier: v--------- Why commented ???
// return _default_value;
return _events.front()->value;
}
@ -789,8 +791,9 @@ ControlList::unlocked_eval (double x) const
upos = _events.back()->when;
uval = _events.back()->value;
if (_interpolation == Discrete)
if (_interpolation == Discrete) {
return lval;
}
/* linear interpolation betweeen the two points
*/
@ -805,6 +808,7 @@ ControlList::unlocked_eval (double x) const
} else if (x == _events.front()->when) {
return _events.front()->value;
} else if (x < _events.front()->when) {
// hansfbaier: v--------- Why commented ???
// return _default_value;
return _events.front()->value;
}