#include "pbd/error.h"
-#include "midi++/names.h"
-
#include "ardour/amp.h"
#include "ardour/automatable.h"
#include "ardour/event_type_map.h"
using namespace ARDOUR;
using namespace PBD;
-framecnt_t Automatable::_automation_interval = 0;
const string Automatable::xml_node_name = X_("Automation");
Automatable::Automatable(Session& session)
: ControlSet (other)
, _a_session (other._a_session)
{
- Glib::Mutex::Lock lm (other._control_lock);
+ Glib::Threads::Mutex::Lock lm (other._control_lock);
for (Controls::const_iterator i = other._controls.begin(); i != other._controls.end(); ++i) {
boost::shared_ptr<Evoral::Control> ac (control_factory (i->first));
Automatable::~Automatable ()
{
{
- Glib::Mutex::Lock lm (_control_lock);
+ Glib::Threads::Mutex::Lock lm (_control_lock);
for (Controls::const_iterator li = _controls.begin(); li != _controls.end(); ++li) {
boost::dynamic_pointer_cast<AutomationControl>(li->second)->drop_references ();
return 1;
}
- Glib::Mutex::Lock lm (control_lock());
+ Glib::Threads::Mutex::Lock lm (control_lock());
set<Evoral::Parameter> tosave;
controls().clear ();
if (param == Evoral::Parameter(GainAutomation)) {
return _("Fader");
} else if (param.type() == MidiCCAutomation) {
- return string_compose("%1: %2 [%3]",
- param.id(), midi_name(param.id()), int(param.channel()) + 1);
+ return string_compose("Controller %1 [%2]", param.id(), int(param.channel()) + 1);
} else if (param.type() == MidiPgmChangeAutomation) {
return string_compose("Program [%1]", int(param.channel()) + 1);
} else if (param.type() == MidiPitchBenderAutomation) {
int
Automatable::set_automation_xml_state (const XMLNode& node, Evoral::Parameter legacy_param)
{
- Glib::Mutex::Lock lm (control_lock());
+ Glib::Threads::Mutex::Lock lm (control_lock());
/* Don't clear controls, since some may be special derived Controllable classes */
XMLNode&
Automatable::get_automation_xml_state ()
{
- Glib::Mutex::Lock lm (control_lock());
+ Glib::Threads::Mutex::Lock lm (control_lock());
XMLNode* node = new XMLNode (Automatable::xml_node_name);
if (controls().empty()) {
void
Automatable::set_parameter_automation_state (Evoral::Parameter param, AutoState s)
{
- Glib::Mutex::Lock lm (control_lock());
+ Glib::Threads::Mutex::Lock lm (control_lock());
boost::shared_ptr<AutomationControl> c = automation_control (param, true);
void
Automatable::set_parameter_automation_style (Evoral::Parameter param, AutoStyle s)
{
- Glib::Mutex::Lock lm (control_lock());
+ Glib::Threads::Mutex::Lock lm (control_lock());
boost::shared_ptr<AutomationControl> c = automation_control(param, true);
AutoStyle
Automatable::get_parameter_automation_style (Evoral::Parameter param)
{
- Glib::Mutex::Lock lm (control_lock());
+ Glib::Threads::Mutex::Lock lm (control_lock());
boost::shared_ptr<Evoral::Control> c = control(param);
boost::shared_ptr<AutomationList> l = boost::dynamic_pointer_cast<AutomationList>(c->list());