From f240b08a1799b3aa6a29701c90388d51c0c1b2ce Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 18 Feb 2017 18:32:02 +0100 Subject: Add experimental PortAudio driver --- src/ingen/ingen.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/ingen/ingen.cpp') 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 + Copyright 2007-2017 David Robillard 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); -- cgit v1.2.1