Display recorded controller data (fix show all/existing automation).

git-svn-id: svn://localhost/ardour2/branches/3.0@3779 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2008-09-21 16:17:02 +00:00
parent eec19ca7af
commit e14187aadd
46 changed files with 460 additions and 375 deletions

View file

@ -26,6 +26,7 @@ using namespace std;
namespace Evoral {
ControlSet::ControlSet()
{
}
@ -40,17 +41,14 @@ void
ControlSet::what_has_data (set<Parameter>& s) const
{
Glib::Mutex::Lock lm (_control_lock);
Controls::const_iterator li;
// FIXME: correct semantics?
for (li = _controls.begin(); li != _controls.end(); ++li) {
s.insert ((*li).first);
for (Controls::const_iterator li = _controls.begin(); li != _controls.end(); ++li) {
s.insert(li->first);
}
}
/** If \a create_if_missing is true, a control list will be created and returned
* if one does not already exists. Otherwise NULL will be returned if a control list
* for \a parameter does not exist.
/** If a control for the given parameter does not exist and \a create_if_missing is true,
* a control will be created, added to this set, and returned.
* If \a create_if_missing is false this function may return null.
*/
boost::shared_ptr<Control>
ControlSet::control (const Parameter& parameter, bool create_if_missing)
@ -61,8 +59,7 @@ ControlSet::control (const Parameter& parameter, bool create_if_missing)
return i->second;
} else if (create_if_missing) {
boost::shared_ptr<ControlList> al (control_list_factory(parameter));
boost::shared_ptr<Control> ac(control_factory(al));
boost::shared_ptr<Control> ac(control_factory(parameter));
add_control(ac);
return ac;
@ -72,19 +69,6 @@ ControlSet::control (const Parameter& parameter, bool create_if_missing)
}
}
boost::shared_ptr<const Control>
ControlSet::control (const Parameter& parameter) const
{
Controls::const_iterator i = _controls.find(parameter);
if (i != _controls.end()) {
return i->second;
} else {
//warning << "ControlList " << parameter.to_string() << " not found for " << _name << endmsg;
return boost::shared_ptr<Control>();
}
}
bool
ControlSet::find_next_event (nframes_t now, nframes_t end, ControlEvent& next_event) const
{
@ -122,18 +106,6 @@ ControlSet::clear ()
for (Controls::iterator li = _controls.begin(); li != _controls.end(); ++li)
li->second->list()->clear();
}
boost::shared_ptr<Control>
ControlSet::control_factory(boost::shared_ptr<ControlList> list) const
{
return boost::shared_ptr<Control>(new Control(list));
}
boost::shared_ptr<ControlList>
ControlSet::control_list_factory(const Parameter& param) const
{
return boost::shared_ptr<ControlList>(new ControlList(param));
}
} // namespace Evoral