summaryrefslogtreecommitdiffstats
path: root/src/engine/Engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/Engine.cpp')
-rw-r--r--src/engine/Engine.cpp31
1 files changed, 3 insertions, 28 deletions
diff --git a/src/engine/Engine.cpp b/src/engine/Engine.cpp
index 6a3d25a6..b57fa542 100644
--- a/src/engine/Engine.cpp
+++ b/src/engine/Engine.cpp
@@ -65,7 +65,6 @@ Engine::Engine(Ingen::Shared::World* a_world)
, _node_factory(new NodeFactory(a_world))
, _message_context(new MessageContext(*this))
, _buffer_factory(new BufferFactory(*this, a_world->uris()))
- //, _buffer_factory(NULL)
, _control_bindings(new ControlBindings(*this))
, _quit_flag(false)
, _activated(false)
@@ -105,46 +104,22 @@ Engine::engine_store() const
}
-int
-Engine::main()
+void
+Engine::quit()
{
- Raul::Thread::get().set_context(THREAD_POST_PROCESS);
-
- // Loop until quit flag is set
- while (!_quit_flag) {
- nanosleep(&main_rate, NULL);
- main_iteration();
- }
- info << "Finished main loop" << endl;
-
- deactivate();
-
- return 0;
+ _quit_flag = true;
}
-
-/** Run one iteration of the main loop.
- *
- * NOT realtime safe (this is where deletion actually occurs)
- */
bool
Engine::main_iteration()
{
_post_processor->process();
_maid->cleanup();
-
return !_quit_flag;
}
void
-Engine::quit()
-{
- _quit_flag = true;
-}
-
-
-void
Engine::add_event_source(SharedPtr<EventSource> source)
{
_event_sources.insert(source);