mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
NO-OP: whitespace
This commit is contained in:
parent
83d54e79d3
commit
d35ee75c77
1 changed files with 78 additions and 72 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
#include <iostream>
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
#ifndef PLATFORM_WINDOWS
|
#ifndef PLATFORM_WINDOWS
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
@ -10,9 +10,9 @@
|
||||||
|
|
||||||
#include "pbd/convert.h"
|
#include "pbd/convert.h"
|
||||||
#include "pbd/crossthread.h"
|
#include "pbd/crossthread.h"
|
||||||
#include "pbd/failed_constructor.h"
|
|
||||||
#include "pbd/error.h"
|
|
||||||
#include "pbd/debug.h"
|
#include "pbd/debug.h"
|
||||||
|
#include "pbd/error.h"
|
||||||
|
#include "pbd/failed_constructor.h"
|
||||||
|
|
||||||
#include "ardour/ardour.h"
|
#include "ardour/ardour.h"
|
||||||
#include "ardour/audioengine.h"
|
#include "ardour/audioengine.h"
|
||||||
|
|
@ -37,7 +37,7 @@ static TestReceiver test_receiver;
|
||||||
/** @param dir Session directory.
|
/** @param dir Session directory.
|
||||||
* @param state Session state file, without .ardour suffix.
|
* @param state Session state file, without .ardour suffix.
|
||||||
*/
|
*/
|
||||||
static Session *
|
static Session*
|
||||||
load_session (string dir, string state)
|
load_session (string dir, string state)
|
||||||
{
|
{
|
||||||
SessionEvent::create_per_thread_pool ("test", 512);
|
SessionEvent::create_per_thread_pool ("test", 512);
|
||||||
|
|
@ -86,7 +86,9 @@ engine_halted (const char* reason)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef PLATFORM_WINDOWS
|
#ifndef PLATFORM_WINDOWS
|
||||||
static void wearedone (int) {
|
static void
|
||||||
|
wearedone (int)
|
||||||
|
{
|
||||||
cerr << "caught signal - terminating." << endl;
|
cerr << "caught signal - terminating." << endl;
|
||||||
xthread.deliver ('x');
|
xthread.deliver ('x');
|
||||||
}
|
}
|
||||||
|
|
@ -126,10 +128,12 @@ print_help ()
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main (int argc, char* argv[])
|
int
|
||||||
|
main (int argc, char* argv[])
|
||||||
{
|
{
|
||||||
const char *optstring = "vhBdD:c:VOU:P";
|
const char* optstring = "vhBdD:c:VOU:P";
|
||||||
|
|
||||||
|
/* clang-format off */
|
||||||
const struct option longopts[] = {
|
const struct option longopts[] = {
|
||||||
{ "version", no_argument, 0, 'v' },
|
{ "version", no_argument, 0, 'v' },
|
||||||
{ "help", no_argument, 0, 'h' },
|
{ "help", no_argument, 0, 'h' },
|
||||||
|
|
@ -142,12 +146,12 @@ int main (int argc, char* argv[])
|
||||||
{ "no-connect-ports", no_argument, 0, 'P' },
|
{ "no-connect-ports", no_argument, 0, 'P' },
|
||||||
{ 0, 0, 0, 0 }
|
{ 0, 0, 0, 0 }
|
||||||
};
|
};
|
||||||
|
/* clang-format on */
|
||||||
|
|
||||||
bool use_vst = true;
|
bool use_vst = true;
|
||||||
bool try_hw_optimization = true;
|
bool try_hw_optimization = true;
|
||||||
|
|
||||||
backend_client_name = PBD::downcase (std::string(PROGRAM_NAME));
|
backend_client_name = PBD::downcase (std::string (PROGRAM_NAME));
|
||||||
|
|
||||||
|
|
||||||
int c;
|
int c;
|
||||||
while ((c = getopt_long (argc, argv, optstring, longopts, (int*)0)) != EOF) {
|
while ((c = getopt_long (argc, argv, optstring, longopts, (int*)0)) != EOF) {
|
||||||
|
|
@ -209,22 +213,23 @@ int main (int argc, char* argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ARDOUR::init (use_vst, try_hw_optimization, localedir)) {
|
if (!ARDOUR::init (use_vst, try_hw_optimization, localedir)) {
|
||||||
cerr << "Ardour failed to initialize\n" << endl;
|
cerr << "Ardour failed to initialize\n"
|
||||||
|
<< endl;
|
||||||
exit (EXIT_FAILURE);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
Session* s = 0;
|
Session* s = 0;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
s = load_session (argv[optind], argv[optind+1]);
|
s = load_session (argv[optind], argv[optind + 1]);
|
||||||
} catch (failed_constructor& e) {
|
} catch (failed_constructor& e) {
|
||||||
cerr << "failed_constructor: " << e.what() << "\n";
|
cerr << "failed_constructor: " << e.what () << "\n";
|
||||||
exit (EXIT_FAILURE);
|
exit (EXIT_FAILURE);
|
||||||
} catch (AudioEngine::PortRegistrationFailure& e) {
|
} catch (AudioEngine::PortRegistrationFailure& e) {
|
||||||
cerr << "PortRegistrationFailure: " << e.what() << "\n";
|
cerr << "PortRegistrationFailure: " << e.what () << "\n";
|
||||||
exit (EXIT_FAILURE);
|
exit (EXIT_FAILURE);
|
||||||
} catch (exception& e) {
|
} catch (exception& e) {
|
||||||
cerr << "exception: " << e.what() << "\n";
|
cerr << "exception: " << e.what () << "\n";
|
||||||
exit (EXIT_FAILURE);
|
exit (EXIT_FAILURE);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
cerr << "unknown exception.\n";
|
cerr << "unknown exception.\n";
|
||||||
|
|
@ -243,21 +248,22 @@ int main (int argc, char* argv[])
|
||||||
|
|
||||||
PBD::ScopedConnectionList con;
|
PBD::ScopedConnectionList con;
|
||||||
BasicUI::AccessAction.connect_same_thread (con, boost::bind (&access_action, _1, _2));
|
BasicUI::AccessAction.connect_same_thread (con, boost::bind (&access_action, _1, _2));
|
||||||
AudioEngine::instance()->Halted.connect_same_thread (con, boost::bind (&engine_halted, _1));
|
AudioEngine::instance ()->Halted.connect_same_thread (con, boost::bind (&engine_halted, _1));
|
||||||
|
|
||||||
#ifndef PLATFORM_WINDOWS
|
#ifndef PLATFORM_WINDOWS
|
||||||
signal(SIGINT, wearedone);
|
signal (SIGINT, wearedone);
|
||||||
signal(SIGTERM, wearedone);
|
signal (SIGTERM, wearedone);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
s->request_transport_speed (1.0);
|
s->request_transport_speed (1.0);
|
||||||
|
|
||||||
char msg;
|
char msg;
|
||||||
do {} while (0 == xthread.receive (msg, true));
|
do {
|
||||||
|
} while (0 == xthread.receive (msg, true));
|
||||||
|
|
||||||
AudioEngine::instance()->remove_session ();
|
AudioEngine::instance ()->remove_session ();
|
||||||
delete s;
|
delete s;
|
||||||
AudioEngine::instance()->stop ();
|
AudioEngine::instance ()->stop ();
|
||||||
|
|
||||||
AudioEngine::destroy ();
|
AudioEngine::destroy ();
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue