summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2019-09-20 09:38:09 -0600
committerPaul Davis <paul@linuxaudiosystems.com>2019-09-20 09:38:17 -0600
commit30a1cffcdc014e0b7a9322e50b8ca768e5c226d1 (patch)
treeb6ff8e1b9d3a66c2f7cde7669cac701413454b0e
parent6b12264d40d8a4275f152414c9cb33a6d8f7ea2f (diff)
rename TransportFSM::FSMEvent to TransportFSM::Event (c/o the Department of Redundancy Department)
-rw-r--r--libs/ardour/ardour/transport_fsm.h30
-rw-r--r--libs/ardour/globals.cc2
-rw-r--r--libs/ardour/session_process.cc6
-rw-r--r--libs/ardour/session_time.cc2
-rw-r--r--libs/ardour/session_transport.cc6
-rw-r--r--libs/ardour/transport_fsm.cc30
6 files changed, 38 insertions, 38 deletions
diff --git a/libs/ardour/ardour/transport_fsm.h b/libs/ardour/ardour/transport_fsm.h
index 570271ee3b..004141a27a 100644
--- a/libs/ardour/ardour/transport_fsm.h
+++ b/libs/ardour/ardour/transport_fsm.h
@@ -40,7 +40,7 @@ struct TransportFSM
LocateDone
};
- struct FSMEvent : public boost::intrusive::list_base_hook<> {
+ struct Event : public boost::intrusive::list_base_hook<> {
EventType type;
union {
bool abort; /* for stop */
@@ -55,7 +55,7 @@ struct TransportFSM
bool with_loop;
bool force;
- FSMEvent (EventType t)
+ Event (EventType t)
: type (t)
, with_roll (false)
, with_flush (false)
@@ -63,14 +63,14 @@ struct TransportFSM
, with_loop (false)
, force (false)
{}
- FSMEvent (EventType t, bool ab, bool cl)
+ Event (EventType t, bool ab, bool cl)
: type (t)
, abort (ab)
, clear_state (cl)
{
assert (t == StopTransport);
}
- FSMEvent (EventType t, samplepos_t pos, bool r, bool fl, bool lp, bool f4c)
+ Event (EventType t, samplepos_t pos, bool r, bool fl, bool lp, bool f4c)
: type (t)
, with_roll (r)
, with_flush (fl)
@@ -132,10 +132,10 @@ struct TransportFSM
void stop_playback ();
void start_saved_locate ();
void roll_after_locate ();
- void start_locate (FSMEvent const &);
- void interrupt_locate (FSMEvent const &);
- void save_locate_and_start_declick (FSMEvent const &);
- void start_declick (FSMEvent const &);
+ void start_locate (Event const &);
+ void interrupt_locate (Event const &);
+ void save_locate_and_start_declick (Event const &);
+ void start_declick (Event const &);
/* guards */
@@ -149,7 +149,7 @@ struct TransportFSM
bool waiting_for_butler() { return _butler_state == WaitingForButler; }
bool declick_in_progress() { return _motion_state == DeclickToLocate || _motion_state == DeclickToStop; }
- void enqueue (FSMEvent* ev) {
+ void enqueue (Event* ev) {
queued_events.push_back (*ev);
if (!processing) {
process_events ();
@@ -162,19 +162,19 @@ struct TransportFSM
void transition (ButlerState bs);
void process_events ();
- bool process_event (FSMEvent&);
+ bool process_event (Event&);
- FSMEvent _last_locate;
- FSMEvent _last_stop;
+ Event _last_locate;
+ Event _last_stop;
TransportAPI* api;
- typedef boost::intrusive::list<FSMEvent> EventList;
+ typedef boost::intrusive::list<Event> EventList;
EventList queued_events;
EventList deferred_events;
int processing;
- void defer (FSMEvent& ev);
- void bad_transition (FSMEvent const &);
+ void defer (Event& ev);
+ void bad_transition (Event const &);
};
} /* end namespace ARDOUR */
diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc
index 2a47fd9dea..0f8ae9a4f2 100644
--- a/libs/ardour/globals.cc
+++ b/libs/ardour/globals.cc
@@ -468,7 +468,7 @@ ARDOUR::init (bool use_windows_vst, bool try_optimization, const char* localedir
#endif
SessionEvent::init_event_pool ();
- TransportFSM::FSMEvent::init_pool ();
+ TransportFSM::Event::init_pool ();
Operations::make_operations_quarks ();
SessionObject::make_property_quarks ();
diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc
index fbcf4c648e..356f46d66c 100644
--- a/libs/ardour/session_process.cc
+++ b/libs/ardour/session_process.cc
@@ -59,9 +59,9 @@ using namespace ARDOUR;
using namespace PBD;
using namespace std;
-#define TFSM_EVENT(evtype) { _transport_fsm->enqueue (new TransportFSM::FSMEvent (evtype)); }
-#define TFSM_STOP(abort,clear) { _transport_fsm->enqueue (new TransportFSM::FSMEvent (TransportFSM::StopTransport,abort,clear)); }
-#define TFSM_LOCATE(target,roll,flush,loop,force) { _transport_fsm->enqueue (new TransportFSM::FSMEvent (TransportFSM::Locate,target,roll,flush,loop,force)); }
+#define TFSM_EVENT(evtype) { _transport_fsm->enqueue (new TransportFSM::Event (evtype)); }
+#define TFSM_STOP(abort,clear) { _transport_fsm->enqueue (new TransportFSM::Event (TransportFSM::StopTransport,abort,clear)); }
+#define TFSM_LOCATE(target,roll,flush,loop,force) { _transport_fsm->enqueue (new TransportFSM::Event (TransportFSM::Locate,target,roll,flush,loop,force)); }
/** Called by the audio engine when there is work to be done with JACK.
diff --git a/libs/ardour/session_time.cc b/libs/ardour/session_time.cc
index 185a86bf4c..e68c4766a9 100644
--- a/libs/ardour/session_time.cc
+++ b/libs/ardour/session_time.cc
@@ -43,7 +43,7 @@ using namespace std;
using namespace ARDOUR;
using namespace PBD;
-#define TFSM_EVENT(evtype) { _transport_fsm->enqueue (new TransportFSM::FSMEvent (evtype)); }
+#define TFSM_EVENT(evtype) { _transport_fsm->enqueue (new TransportFSM::Event (evtype)); }
/* BBT TIME*/
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index e9f6ed6bbe..b0f7c0b414 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -82,9 +82,9 @@ using namespace PBD;
#endif
-#define TFSM_EVENT(evtype) { _transport_fsm->enqueue (new TransportFSM::FSMEvent (evtype)); }
-#define TFSM_STOP(abort,clear) { _transport_fsm->enqueue (new TransportFSM::FSMEvent (TransportFSM::StopTransport,abort,clear)); }
-#define TFSM_LOCATE(target,roll,flush,loop,force) { _transport_fsm->enqueue (new TransportFSM::FSMEvent (TransportFSM::Locate,target,roll,flush,loop,force)); }
+#define TFSM_EVENT(evtype) { _transport_fsm->enqueue (new TransportFSM::Event (evtype)); }
+#define TFSM_STOP(abort,clear) { _transport_fsm->enqueue (new TransportFSM::Event (TransportFSM::StopTransport,abort,clear)); }
+#define TFSM_LOCATE(target,roll,flush,loop,force) { _transport_fsm->enqueue (new TransportFSM::Event (TransportFSM::Locate,target,roll,flush,loop,force)); }
/* *****************************************************************************
* REALTIME ACTIONS (to be called on state transitions)
diff --git a/libs/ardour/transport_fsm.cc b/libs/ardour/transport_fsm.cc
index 2b02346852..5f394f9bd7 100644
--- a/libs/ardour/transport_fsm.cc
+++ b/libs/ardour/transport_fsm.cc
@@ -29,22 +29,22 @@
using namespace ARDOUR;
using namespace PBD;
-Pool* TransportFSM::FSMEvent::pool = 0;
+Pool* TransportFSM::Event::pool = 0;
void
-TransportFSM::FSMEvent::init_pool ()
+TransportFSM::Event::init_pool ()
{
- pool = new Pool (X_("FSMEvents"), sizeof (FSMEvent), 128);
+ pool = new Pool (X_("Events"), sizeof (Event), 128);
}
void*
-TransportFSM::FSMEvent::operator new (size_t)
+TransportFSM::Event::operator new (size_t)
{
return pool->alloc();
}
void
-TransportFSM::FSMEvent::operator delete (void *ptr, size_t /*size*/)
+TransportFSM::Event::operator delete (void *ptr, size_t /*size*/)
{
return pool->release (ptr);
}
@@ -87,7 +87,7 @@ TransportFSM::process_events ()
DEBUG_TRACE (DEBUG::TFSMEvents, string_compose ("processing %1 deferred events\n", deferred_events.size()));
for (EventList::iterator e = deferred_events.begin(); e != deferred_events.end(); ) {
- FSMEvent* deferred_ev = &(*e);
+ Event* deferred_ev = &(*e);
if (process_event (*e)) { /* event processed, remove from deferred */
e = deferred_events.erase (e);
delete deferred_ev;
@@ -99,7 +99,7 @@ TransportFSM::process_events ()
}
}
- FSMEvent* ev = &queued_events.front();
+ Event* ev = &queued_events.front();
queued_events.pop_front ();
delete ev;
}
@@ -166,14 +166,14 @@ TransportFSM::current_state () const
}
void
-TransportFSM::bad_transition (FSMEvent const & ev)
+TransportFSM::bad_transition (Event const & ev)
{
error << "bad transition, current state = " << current_state() << " event = " << enum_2_string (ev.type) << endmsg;
std::cerr << "bad transition, current state = " << current_state() << " event = " << enum_2_string (ev.type) << std::endl;
}
bool
-TransportFSM::process_event (FSMEvent& ev)
+TransportFSM::process_event (Event& ev)
{
DEBUG_TRACE (DEBUG::TFSMEvents, string_compose ("process %1\n", enum_2_string (ev.type)));
@@ -305,7 +305,7 @@ TransportFSM::start_playback ()
}
void
-TransportFSM::start_declick (FSMEvent const & s)
+TransportFSM::start_declick (Event const & s)
{
assert (s.type == StopTransport);
DEBUG_TRACE (DEBUG::TFSMEvents, "tfsm::start_declick\n");
@@ -320,16 +320,16 @@ TransportFSM::stop_playback ()
}
void
-TransportFSM::save_locate_and_start_declick (FSMEvent const & l)
+TransportFSM::save_locate_and_start_declick (Event const & l)
{
assert (l.type == Locate);
DEBUG_TRACE (DEBUG::TFSMEvents, "tfsm::save_locate_and_stop\n");
_last_locate = l;
- _last_stop = FSMEvent (StopTransport, false, false);
+ _last_stop = Event (StopTransport, false, false);
}
void
-TransportFSM::start_locate (FSMEvent const & l)
+TransportFSM::start_locate (Event const & l)
{
assert (l.type == Locate);
DEBUG_TRACE (DEBUG::TFSMEvents, "tfsm::start_locate\n");
@@ -344,7 +344,7 @@ TransportFSM::start_saved_locate ()
}
void
-TransportFSM::interrupt_locate (FSMEvent const & l)
+TransportFSM::interrupt_locate (Event const & l)
{
assert (l.type == Locate);
DEBUG_TRACE (DEBUG::TFSMEvents, "tfsm::interrupt\n");
@@ -376,7 +376,7 @@ TransportFSM::roll_after_locate ()
}
void
-TransportFSM::defer (FSMEvent& ev)
+TransportFSM::defer (Event& ev)
{
DEBUG_TRACE (DEBUG::TFSMEvents, string_compose ("Defer %1 during %2\n", enum_2_string (ev.type), current_state()));
deferred_events.push_back (ev);