summaryrefslogtreecommitdiffstats
path: root/src/ingen/ingen.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-02-18 18:32:02 +0100
committerDavid Robillard <d@drobilla.net>2017-02-18 19:38:13 +0100
commitf240b08a1799b3aa6a29701c90388d51c0c1b2ce (patch)
tree28ec7429aa10f28710023fdcc43d07a4f0b4ebc9 /src/ingen/ingen.cpp
parent6141b832946006a6ec3c1a3a70bd729c0404771e (diff)
downloadingen-f240b08a1799b3aa6a29701c90388d51c0c1b2ce.tar.gz
ingen-f240b08a1799b3aa6a29701c90388d51c0c1b2ce.tar.bz2
ingen-f240b08a1799b3aa6a29701c90388d51c0c1b2ce.zip
Add experimental PortAudio driver
Diffstat (limited to 'src/ingen/ingen.cpp')
-rw-r--r--src/ingen/ingen.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/ingen/ingen.cpp b/src/ingen/ingen.cpp
index e6f781df..3d209d20 100644
--- a/src/ingen/ingen.cpp
+++ b/src/ingen/ingen.cpp
@@ -1,6 +1,6 @@
/*
This file is part of Ingen.
- Copyright 2007-2015 David Robillard <http://drobilla.net/>
+ Copyright 2007-2017 David Robillard <http://drobilla.net/>
Ingen is free software: you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free
@@ -149,8 +149,11 @@ main(int argc, char** argv)
// Activate the engine, if we have one
if (world->engine()) {
- ingen_try(world->load_module("jack"), "Failed to load jack module");
- world->engine()->activate();
+ if (!world->load_module("jack") && !world->load_module("portaudio")) {
+ cerr << "ingen: error: Failed to load driver module" << endl;
+ delete world;
+ exit(EXIT_FAILURE);
+ }
}
// Load a graph
@@ -213,6 +216,12 @@ main(int argc, char** argv)
}
}
+ // Activate the engine now that the graph is loaded
+ if (world->engine()) {
+ world->engine()->flush_events(std::chrono::milliseconds(10));
+ world->engine()->activate();
+ }
+
// Set up signal handlers that will set quit_flag on interrupt
signal(SIGINT, ingen_interrupt);
signal(SIGTERM, ingen_interrupt);