diff options
author | David Robillard <d@drobilla.net> | 2013-01-13 01:05:24 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-01-13 01:05:24 +0000 |
commit | 8941b58c8737d948f4c925955506da666ceb60ed (patch) | |
tree | a22d873e5d8a5033c4a9a09310a34e8ff1d3530c /src/engine | |
parent | 301b5e158ea31a7d2918c5d257e114a9b92745ed (diff) | |
download | machina-8941b58c8737d948f4c925955506da666ceb60ed.tar.gz machina-8941b58c8737d948f4c925955506da666ceb60ed.tar.bz2 machina-8941b58c8737d948f4c925955506da666ceb60ed.zip |
Remove pointless typedef.
git-svn-id: http://svn.drobilla.net/lad/trunk/machina@4944 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/Controller.cpp | 2 | ||||
-rw-r--r-- | src/engine/Machine.cpp | 14 | ||||
-rw-r--r-- | src/engine/SMFDriver.cpp | 2 | ||||
-rw-r--r-- | src/engine/Updates.cpp | 16 | ||||
-rw-r--r-- | src/engine/machina/Controller.hpp | 2 | ||||
-rw-r--r-- | src/engine/machina/Driver.hpp | 10 | ||||
-rw-r--r-- | src/engine/machina/Machine.hpp | 14 | ||||
-rw-r--r-- | src/engine/machina/Updates.hpp | 16 | ||||
-rw-r--r-- | src/engine/machina/types.hpp | 2 |
9 files changed, 38 insertions, 40 deletions
diff --git a/src/engine/Controller.cpp b/src/engine/Controller.cpp index df60c97..ffe30e1 100644 --- a/src/engine/Controller.cpp +++ b/src/engine/Controller.cpp @@ -31,7 +31,7 @@ Controller::Controller(SPtr<Engine> engine, Client::ClientModel& client_model) : _engine(engine) , _client_model(client_model) - , _updates(new UpdateBuffer(4096)) + , _updates(new Raul::RingBuffer(4096)) { _engine->driver()->set_update_sink(_updates); } diff --git a/src/engine/Machine.cpp b/src/engine/Machine.cpp index 3e5cf4d..63c37b8 100644 --- a/src/engine/Machine.cpp +++ b/src/engine/Machine.cpp @@ -212,9 +212,9 @@ Machine::earliest_node() const * Returns true if node was entered, or false if the maximum active nodes has been reached. */ bool -Machine::enter_node(Context& context, - SPtr<Node> node, - SPtr<UpdateBuffer> updates) +Machine::enter_node(Context& context, + SPtr<Node> node, + SPtr<Raul::RingBuffer> updates) { assert(!node->is_active()); @@ -243,9 +243,9 @@ Machine::enter_node(Context& context, /** Exit an active node at the current _time. */ void -Machine::exit_node(Context& context, - SPtr<Node> node, - SPtr<UpdateBuffer> updates) +Machine::exit_node(Context& context, + SPtr<Node> node, + SPtr<Raul::RingBuffer> updates) { node->exit(context.sink(), _time); write_set(updates, @@ -313,7 +313,7 @@ Machine::exit_node(Context& context, * with sample accuracy if necessary). */ uint32_t -Machine::run(Context& context, SPtr<UpdateBuffer> updates) +Machine::run(Context& context, SPtr<Raul::RingBuffer> updates) { if (_is_finished) { return 0; diff --git a/src/engine/SMFDriver.cpp b/src/engine/SMFDriver.cpp index 7401755..923c2fa 100644 --- a/src/engine/SMFDriver.cpp +++ b/src/engine/SMFDriver.cpp @@ -162,7 +162,7 @@ SMFDriver::run(SPtr<Machine> machine, Raul::TimeStamp max_time) context.set_sink(this); context.time().set_slice(TimeStamp(max_time.unit(), 0, 0), context.time().beats_to_ticks(max_time)); - machine->run(context, SPtr<UpdateBuffer>()); + machine->run(context, SPtr<Raul::RingBuffer>()); } } // namespace Machina diff --git a/src/engine/Updates.cpp b/src/engine/Updates.cpp index 275ca2b..2775292 100644 --- a/src/engine/Updates.cpp +++ b/src/engine/Updates.cpp @@ -25,10 +25,10 @@ namespace Machina { void -write_set(SPtr<UpdateBuffer> buf, - uint64_t subject, - URIInt key, - const Raul::Atom& value) +write_set(SPtr<Raul::RingBuffer> buf, + uint64_t subject, + URIInt key, + const Raul::Atom& value) { const uint32_t update_type = UPDATE_SET; buf->write(sizeof(update_type), &update_type); @@ -41,10 +41,10 @@ write_set(SPtr<UpdateBuffer> buf, } uint32_t -read_set(SPtr<UpdateBuffer> buf, - uint64_t* subject, - URIInt* key, - Raul::Atom* value) +read_set(SPtr<Raul::RingBuffer> buf, + uint64_t* subject, + URIInt* key, + Raul::Atom* value) { uint32_t update_type; buf->read(sizeof(update_type), &update_type); diff --git a/src/engine/machina/Controller.hpp b/src/engine/machina/Controller.hpp index eb04c59..d5a7928 100644 --- a/src/engine/machina/Controller.hpp +++ b/src/engine/machina/Controller.hpp @@ -81,7 +81,7 @@ private: SPtr<Engine> _engine; Client::ClientModel& _client_model; - SPtr<UpdateBuffer> _updates; + SPtr<Raul::RingBuffer> _updates; }; } diff --git a/src/engine/machina/Driver.hpp b/src/engine/machina/Driver.hpp index ea0bf8f..1ef0a7f 100644 --- a/src/engine/machina/Driver.hpp +++ b/src/engine/machina/Driver.hpp @@ -45,9 +45,9 @@ public: _machine = machine; } - SPtr<UpdateBuffer> update_sink() { return _updates; } + SPtr<Raul::RingBuffer> update_sink() { return _updates; } - void set_update_sink(SPtr<UpdateBuffer> b) { + void set_update_sink(SPtr<Raul::RingBuffer> b) { _updates = b; } @@ -65,9 +65,9 @@ public: virtual void finish_record() {} protected: - Raul::Forge& _forge; - SPtr<Machine> _machine; - SPtr<UpdateBuffer> _updates; + Raul::Forge& _forge; + SPtr<Machine> _machine; + SPtr<Raul::RingBuffer> _updates; }; } // namespace Machina diff --git a/src/engine/machina/Machine.hpp b/src/engine/machina/Machine.hpp index 1a8f267..d65cec4 100644 --- a/src/engine/machina/Machine.hpp +++ b/src/engine/machina/Machine.hpp @@ -67,7 +67,7 @@ public: // Audio context void reset(MIDISink* sink, Raul::TimeStamp time); - uint32_t run(Context& context, SPtr<UpdateBuffer> updates); + uint32_t run(Context& context, SPtr<Raul::RingBuffer> updates); // Any context inline Raul::TimeStamp time() const { return _time; } @@ -86,13 +86,13 @@ private: // Audio context SPtr<Node> earliest_node() const; - bool enter_node(Context& context, - SPtr<Node> node, - SPtr<UpdateBuffer> updates); + bool enter_node(Context& context, + SPtr<Node> node, + SPtr<Raul::RingBuffer> updates); - void exit_node(Context& context, - SPtr<Node> node, - SPtr<UpdateBuffer> updates); + void exit_node(Context& context, + SPtr<Node> node, + SPtr<Raul::RingBuffer> updates); static const size_t MAX_ACTIVE_NODES = 128; diff --git a/src/engine/machina/Updates.hpp b/src/engine/machina/Updates.hpp index cf29886..5f6a324 100644 --- a/src/engine/machina/Updates.hpp +++ b/src/engine/machina/Updates.hpp @@ -31,16 +31,16 @@ enum UpdateType { }; void -write_set(SPtr<UpdateBuffer> buf, - uint64_t subject, - URIInt key, - const Raul::Atom& value); +write_set(SPtr<Raul::RingBuffer> buf, + uint64_t subject, + URIInt key, + const Raul::Atom& value); uint32_t -read_set(SPtr<UpdateBuffer> buf, - uint64_t* subject, - URIInt* key, - Raul::Atom* value); +read_set(SPtr<Raul::RingBuffer> buf, + uint64_t* subject, + URIInt* key, + Raul::Atom* value); } // namespace Machina diff --git a/src/engine/machina/types.hpp b/src/engine/machina/types.hpp index d71e144..23d5f1c 100644 --- a/src/engine/machina/types.hpp +++ b/src/engine/machina/types.hpp @@ -26,8 +26,6 @@ namespace Machina { typedef unsigned char byte; -typedef Raul::RingBuffer UpdateBuffer; - typedef uint32_t URIInt; template <class T> |