diff options
author | Ben Loftis <ben@glw.com> | 2010-04-20 17:27:45 +0000 |
---|---|---|
committer | Ben Loftis <ben@glw.com> | 2010-04-20 17:27:45 +0000 |
commit | 4894ec8c413c0447ed3fd60ea2fcf3975ee96ceb (patch) | |
tree | 1ce393b9c212e1d45a96848bcc0fe5f970e8f511 /libs | |
parent | f2588f6814cff6cd9c7ef3a67c41a0bfdc7e5c7b (diff) |
append Auto_ to auto modes so they are more easily searchable
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@6941 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/automation_event.h | 4 | ||||
-rw-r--r-- | libs/ardour/ardour/io.h | 6 | ||||
-rw-r--r-- | libs/ardour/ardour/types.h | 12 | ||||
-rw-r--r-- | libs/ardour/audio_track.cc | 6 | ||||
-rw-r--r-- | libs/ardour/automation_event.cc | 16 | ||||
-rw-r--r-- | libs/ardour/enums.cc | 12 | ||||
-rw-r--r-- | libs/ardour/insert.cc | 16 | ||||
-rw-r--r-- | libs/ardour/io.cc | 14 | ||||
-rw-r--r-- | libs/ardour/panner.cc | 14 | ||||
-rw-r--r-- | libs/ardour/route.cc | 20 | ||||
-rw-r--r-- | libs/ardour/utils.cc | 28 | ||||
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.cc | 4 |
12 files changed, 76 insertions, 76 deletions
diff --git a/libs/ardour/ardour/automation_event.h b/libs/ardour/ardour/automation_event.h index 9d405ec72f..470445d65e 100644 --- a/libs/ardour/ardour/automation_event.h +++ b/libs/ardour/ardour/automation_event.h @@ -129,10 +129,10 @@ class AutomationList : public PBD::StatefulDestructible sigc::signal<void> automation_state_changed; bool automation_playback() { - return (_state & Play) || ((_state & Touch) && !_touching); + return (_state & Auto_Play) || ((_state & Auto_Touch) && !_touching); } bool automation_write () { - return (_state & Write) || ((_state & Touch) && _touching); + return (_state & Auto_Write) || ((_state & Auto_Touch) && _touching); } void start_touch (); diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h index 3ef3a5a6d4..6ae917b9d4 100644 --- a/libs/ardour/ardour/io.h +++ b/libs/ardour/ardour/io.h @@ -245,12 +245,12 @@ class IO : public PBD::StatefulDestructible void clear_automation (); bool gain_automation_recording() const { - return (_gain_automation_curve.automation_state() & (Write|Touch)); + return (_gain_automation_curve.automation_state() & (Auto_Write|Auto_Touch)); } bool gain_automation_playback() const { - return (_gain_automation_curve.automation_state() & Play) || - ((_gain_automation_curve.automation_state() & Touch) && + return (_gain_automation_curve.automation_state() & Auto_Play) || + ((_gain_automation_curve.automation_state() & Auto_Touch) && !_gain_automation_curve.touching()); } diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h index 81b7bdd789..84c4d0c5e5 100644 --- a/libs/ardour/ardour/types.h +++ b/libs/ardour/ardour/types.h @@ -90,18 +90,18 @@ namespace ARDOUR { }; enum AutoState { - Off = 0x0, - Write = 0x1, - Touch = 0x2, - Play = 0x4 + Auto_Off = 0x0, + Auto_Write = 0x1, + Auto_Touch = 0x2, + Auto_Play = 0x4 }; std::string auto_state_to_string (AutoState); AutoState string_to_auto_state (std::string); enum AutoStyle { - Absolute = 0x1, - Trim = 0x2 + Auto_Absolute = 0x1, + Auto_Trim = 0x2 }; std::string auto_style_to_string (AutoStyle); diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc index 433ac1d1de..d77ecbb34d 100644 --- a/libs/ardour/audio_track.cc +++ b/libs/ardour/audio_track.cc @@ -813,7 +813,7 @@ AudioTrack::export_stuff (vector<Sample*>& buffers, uint32_t nbufs, nframes_t st } } - if (_gain_automation_curve.automation_state() == Play) { + if (_gain_automation_curve.automation_state() == Auto_Play) { _gain_automation_curve.get_vector (start, start + nframes, gain_automation, nframes); @@ -961,8 +961,8 @@ AudioTrack::freeze (InterThreadInfo& itt) /* reset stuff that has already been accounted for in the freeze process */ set_gain (1.0, this); - _gain_automation_curve.set_automation_state (Off); - _panner->set_automation_state (Off); + _gain_automation_curve.set_automation_state (Auto_Off); + _panner->set_automation_state (Auto_Off); _freeze_record.state = Frozen; FreezeChange(); /* EMIT SIGNAL */ diff --git a/libs/ardour/automation_event.cc b/libs/ardour/automation_event.cc index 81347d5d40..4799411b6c 100644 --- a/libs/ardour/automation_event.cc +++ b/libs/ardour/automation_event.cc @@ -57,8 +57,8 @@ AutomationList::AutomationList (double defval) { _frozen = 0; changed_when_thawed = false; - _state = Off; - _style = Absolute; + _state = Auto_Off; + _style = Auto_Absolute; _touching = false; _new_touch = false; min_yval = FLT_MIN; @@ -146,8 +146,8 @@ AutomationList::AutomationList (const XMLNode& node) max_yval = FLT_MAX; max_xval = 0; // means "no limit" _dirty = false; - _state = Off; - _style = Absolute; + _state = Auto_Off; + _style = Auto_Absolute; rt_insertion_point = events.end(); lookup_cache.left = -1; lookup_cache.range.first = events.end(); @@ -327,7 +327,7 @@ AutomationList::rt_add (double when, double value) { /* this is for automation recording */ - if ((_state & Touch) && !_touching) { + if ((_state & Auto_Touch) && !_touching) { return; } @@ -1267,7 +1267,7 @@ AutomationList::state (bool full) root->add_property ("state", auto_state_to_string (_state)); } else { /* never save anything but Off for automation state to a template */ - root->add_property ("state", auto_state_to_string (Off)); + root->add_property ("state", auto_state_to_string (Auto_Off)); } root->add_property ("style", auto_style_to_string (_style)); @@ -1426,13 +1426,13 @@ AutomationList::set_state (const XMLNode& node) if ((prop = node.property (X_("style"))) != 0) { _style = string_to_auto_style (prop->value()); } else { - _style = Absolute; + _style = Auto_Absolute; } if ((prop = node.property (X_("state"))) != 0) { _state = string_to_auto_state (prop->value()); } else { - _state = Off; + _state = Auto_Off; } if ((prop = node.property (X_("min_yval"))) != 0) { diff --git a/libs/ardour/enums.cc b/libs/ardour/enums.cc index 25f3eccf61..395f1acbfe 100644 --- a/libs/ardour/enums.cc +++ b/libs/ardour/enums.cc @@ -107,14 +107,14 @@ setup_enum_writer () REGISTER_ENUM (MuteAutomation); REGISTER_BITS (_AutomationType); - REGISTER_ENUM (Off); - REGISTER_ENUM (Write); - REGISTER_ENUM (Touch); - REGISTER_ENUM (Play); + REGISTER_ENUM (Auto_Off); + REGISTER_ENUM (Auto_Write); + REGISTER_ENUM (Auto_Touch); + REGISTER_ENUM (Auto_Play); REGISTER_BITS (_AutoState); - REGISTER_ENUM (Absolute); - REGISTER_ENUM (Trim); + REGISTER_ENUM (Auto_Absolute); + REGISTER_ENUM (Auto_Trim); REGISTER_BITS (_AutoStyle); REGISTER_ENUM (CaptureTime); diff --git a/libs/ardour/insert.cc b/libs/ardour/insert.cc index e3c6523215..035d344ab6 100644 --- a/libs/ardour/insert.cc +++ b/libs/ardour/insert.cc @@ -169,7 +169,7 @@ PluginInsert::auto_state_changed (uint32_t which) /* don't reset automation if we're moving to Off or Write mode; if we're moving to Write, the user may have manually set up automation that they don't want to lose */ - if (alist.automation_state() != Off && alist.automation_state() != Write) { + if (alist.automation_state() != Auto_Off && alist.automation_state() != Auto_Write) { _plugins[0]->set_parameter (which, alist.eval (_session.transport_frame())); } } @@ -361,7 +361,7 @@ PluginInsert::transport_stopped (nframes_t now) if (alist) { alist->reposition_for_rt_add (now); - if (alist->automation_state() != Off) { + if (alist->automation_state() != Auto_Off) { _plugins[0]->set_parameter (n, alist->eval (now)); } } @@ -507,7 +507,7 @@ PluginInsert::get_port_automation_state (uint32_t port) if (port < _plugins[0]->parameter_count()) { return automation_list (port).automation_state(); } else { - return Off; + return Auto_Off; } } @@ -523,11 +523,11 @@ PluginInsert::protect_automation () AutomationList& al = automation_list (*i); switch (al.automation_state()) { - case Write: - al.set_automation_state (Off); + case Auto_Write: + al.set_automation_state (Auto_Off); break; - case Touch: - al.set_automation_state (Play); + case Auto_Touch: + al.set_automation_state (Auto_Play); break; default: break; @@ -831,7 +831,7 @@ PluginInsert::set_state(const XMLNode& node) /* missing */ - automation_list (port_id).set_automation_state (Off); + automation_list (port_id).set_automation_state (Auto_Off); } } diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index 2f060534de..2fe72a276c 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -165,8 +165,8 @@ IO::IO (Session& s, string name, last_automation_snapshot = 0; - _gain_automation_state = Off; - _gain_automation_style = Absolute; + _gain_automation_state = Auto_Off; + _gain_automation_style = Auto_Absolute; { // IO::Meter is emitted from another thread so the @@ -1565,7 +1565,7 @@ IO::state (bool full_state) snprintf (buf, sizeof (buf), "0x%x", (int) _gain_automation_curve.automation_state()); } else { /* never store anything except Off for automation state in a template */ - snprintf (buf, sizeof (buf), "0x%x", ARDOUR::Off); + snprintf (buf, sizeof (buf), "0x%x", ARDOUR::Auto_Off); } return *node; @@ -2591,7 +2591,7 @@ IO::set_gain_automation_state (AutoState state) /* don't reset gain if we're moving to Off or Write mode; if we're moving to Write, the user may have manually set up gains that they don't want to lose */ - if (state != Off && state != Write) { + if (state != Auto_Off && state != Auto_Write) { set_gain (_gain_automation_curve.eval (_session.transport_frame()), this); } } @@ -2671,7 +2671,7 @@ IO::end_gain_touch () bool mark = false; double when = 0; - if (_session.transport_rolling() && _gain_automation_curve.automation_state() == Touch) { + if (_session.transport_rolling() && _gain_automation_curve.automation_state() == Auto_Touch) { mark = true; when = _session.transport_frame(); } @@ -2694,7 +2694,7 @@ IO::end_pan_touch (uint32_t which) bool mark = false; double when = 0; - if (_session.transport_rolling() && (*_panner)[which]->automation().automation_state() == Touch) { + if (_session.transport_rolling() && (*_panner)[which]->automation().automation_state() == Auto_Touch) { mark = true; when = _session.transport_frame(); } @@ -2719,7 +2719,7 @@ IO::transport_stopped (nframes_t frame) { _gain_automation_curve.reposition_for_rt_add (frame); - if (_gain_automation_curve.automation_state() != Off) { + if (_gain_automation_curve.automation_state() != Auto_Off) { /* the src=0 condition is a special signal to not propagate automation gain changes into the mix group when locating. diff --git a/libs/ardour/panner.cc b/libs/ardour/panner.cc index 737c2e052a..25ce8b2277 100644 --- a/libs/ardour/panner.cc +++ b/libs/ardour/panner.cc @@ -102,7 +102,7 @@ StreamPanner::PanControllable::can_send_feedback () const { AutoState astate = panner.get_parent().automation_state (); - if ((astate == Play) || (astate == Touch && !panner.get_parent().touching())) { + if ((astate == Auto_Play) || (astate == Auto_Touch && !panner.get_parent().touching())) { return true; } @@ -198,7 +198,7 @@ BaseStereoPanner::~BaseStereoPanner () void BaseStereoPanner::snapshot (nframes_t now) { - if (_automation.automation_state() == Write || _automation.automation_state() == Touch) { + if (_automation.automation_state() == Auto_Write || _automation.automation_state() == Auto_Touch) { _automation.rt_add (now, x); } } @@ -206,7 +206,7 @@ BaseStereoPanner::snapshot (nframes_t now) void BaseStereoPanner::transport_stopped (nframes_t frame) { - if (_automation.automation_state() != Off) { + if (_automation.automation_state() != Auto_Off) { set_position (_automation.eval (frame)); } @@ -229,7 +229,7 @@ BaseStereoPanner::set_automation_state (AutoState state) /* don't reset pan if we're moving to Off or Write mode; if we're moving to Write, the user may have manually set up pans that they don't want to lose */ - if (state != Off && state != Write) { + if (state != Auto_Off && state != Auto_Write) { set_position (_automation.eval (parent.session().transport_frame())); } } @@ -546,7 +546,7 @@ EqualPowerStereoPanner::set_state (const XMLNode& node) _automation.set_state (*((*iter)->children().front())); - if (_automation.automation_state() != Off) { + if (_automation.automation_state() != Auto_Off) { set_position (_automation.eval (parent.session().transport_frame())); } } @@ -1067,7 +1067,7 @@ Panner::automation_state () const if (!empty()) { return front()->automation().automation_state (); } else { - return Off; + return Auto_Off; } } @@ -1077,7 +1077,7 @@ Panner::automation_style () const if (!empty()) { return front()->automation().automation_style (); } else { - return Absolute; + return Auto_Absolute; } } diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index f8d2917413..3ae80ede9c 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -717,8 +717,8 @@ Route::process_output_buffers (vector<Sample*>& bufs, uint32_t nbufs, } else { // cerr << _name << " panner state = " << _panner->automation_state() << endl; if (!_panner->empty() && - (_panner->automation_state() & Play || - ((_panner->automation_state() & Touch) && !_panner->touching()))) { + (_panner->automation_state() & Auto_Play || + ((_panner->automation_state() & Auto_Touch) && !_panner->touching()))) { pan_automated (bufs, nbufs, start_frame, end_frame, nframes); } else { pan (bufs, nbufs, nframes, 1.0); @@ -2608,21 +2608,21 @@ void Route::protect_automation () { switch (gain_automation_state()) { - case Write: - set_gain_automation_state (Off); - case Touch: - set_gain_automation_state (Play); + case Auto_Write: + set_gain_automation_state (Auto_Off); + case Auto_Touch: + set_gain_automation_state (Auto_Play); break; default: break; } switch (panner().automation_state ()) { - case Write: - panner().set_automation_state (Off); + case Auto_Write: + panner().set_automation_state (Auto_Off); break; - case Touch: - panner().set_automation_state (Play); + case Auto_Touch: + panner().set_automation_state (Auto_Play); break; default: break; diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc index 98b51cb578..3e4bfe57b6 100644 --- a/libs/ardour/utils.cc +++ b/libs/ardour/utils.cc @@ -511,18 +511,18 @@ AutoState ARDOUR::string_to_auto_state (std::string str) { if (str == X_("Off")) { - return Off; + return Auto_Off; } else if (str == X_("Play")) { - return Play; + return Auto_Play; } else if (str == X_("Write")) { - return Write; + return Auto_Write; } else if (str == X_("Touch")) { - return Touch; + return Auto_Touch; } fatal << string_compose (_("programming error: %1 %2"), "illegal AutoState string: ", str) << endmsg; /*NOTREACHED*/ - return Touch; + return Auto_Touch; } string @@ -531,16 +531,16 @@ ARDOUR::auto_state_to_string (AutoState as) /* to be used only for XML serialization, no i18n done */ switch (as) { - case Off: + case Auto_Off: return X_("Off"); break; - case Play: + case Auto_Play: return X_("Play"); break; - case Write: + case Auto_Write: return X_("Write"); break; - case Touch: + case Auto_Touch: return X_("Touch"); } @@ -553,14 +553,14 @@ AutoStyle ARDOUR::string_to_auto_style (std::string str) { if (str == X_("Absolute")) { - return Absolute; + return Auto_Absolute; } else if (str == X_("Trim")) { - return Trim; + return Auto_Trim; } fatal << string_compose (_("programming error: %1 %2"), "illegal AutoStyle string: ", str) << endmsg; /*NOTREACHED*/ - return Trim; + return Auto_Trim; } string @@ -569,10 +569,10 @@ ARDOUR::auto_style_to_string (AutoStyle as) /* to be used only for XML serialization, no i18n done */ switch (as) { - case Absolute: + case Auto_Absolute: return X_("Absolute"); break; - case Trim: + case Auto_Trim: return X_("Trim"); break; } diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index bf3dc6b514..5ba1d641d0 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -1117,13 +1117,13 @@ void MackieControlProtocol::update_automation( RouteSignal & rs ) { ARDOUR::AutoState gain_state = rs.route()->gain_automation_state(); - if ( gain_state == Touch || gain_state == Play ) + if ( gain_state == Auto_Touch || gain_state == Auto_Play ) { notify_gain_changed( &rs, false ); } ARDOUR::AutoState panner_state = rs.route()->panner().automation_state(); - if ( panner_state == Touch || panner_state == Play ) + if ( panner_state == Auto_Touch || panner_state == Auto_Play ) { notify_panner_changed( &rs, false ); } |