@@ -270,11 +270,11 @@ Engine::shutdown ( void ) | |||||
/** Connect to JACK */ | /** Connect to JACK */ | ||||
int | |||||
const char * | |||||
Engine::init ( void ) | Engine::init ( void ) | ||||
{ | { | ||||
if (( _client = jack_client_open ( APP_NAME, (jack_options_t)0, NULL )) == 0 ) | if (( _client = jack_client_open ( APP_NAME, (jack_options_t)0, NULL )) == 0 ) | ||||
return 0; | |||||
return NULL; | |||||
#define set_callback( name ) jack_set_ ## name ## _callback( _client, &Engine:: name , this ) | #define set_callback( name ) jack_set_ ## name ## _callback( _client, &Engine:: name , this ) | ||||
@@ -301,7 +301,7 @@ Engine::init ( void ) | |||||
timeline->_sample_rate = frame_rate(); | timeline->_sample_rate = frame_rate(); | ||||
/* we don't need to create any ports until tracks are created */ | /* we don't need to create any ports until tracks are created */ | ||||
return 1; | |||||
return jack_get_client_name( _client ); | |||||
} | } | ||||
void | void | ||||
@@ -74,7 +74,7 @@ public: | |||||
Engine ( ); | Engine ( ); | ||||
int init ( void ); | |||||
const char * init ( void ); | |||||
nframes_t nframes ( void ) const { return jack_get_buffer_size( _client ); } | nframes_t nframes ( void ) const { return jack_get_buffer_size( _client ); } | ||||
float frame_rate ( void ) const { return jack_get_sample_rate( _client ); } | float frame_rate ( void ) const { return jack_get_sample_rate( _client ); } | ||||
@@ -123,7 +123,10 @@ main ( int argc, char **argv ) | |||||
/* we don't really need a pointer for this */ | /* we don't really need a pointer for this */ | ||||
engine = new Engine; | engine = new Engine; | ||||
if ( ! engine->init() ) | |||||
const char *jack_name; | |||||
if ( ! ( jack_name = engine->init() ) ) | |||||
FATAL( "Could not connect to JACK!" ); | FATAL( "Could not connect to JACK!" ); | ||||
/* always start stopped (please imagine for me a realistic | /* always start stopped (please imagine for me a realistic | ||||
@@ -133,7 +136,7 @@ main ( int argc, char **argv ) | |||||
MESSAGE( "Initializing LASH" ); | MESSAGE( "Initializing LASH" ); | ||||
lash = new LASH; | lash = new LASH; | ||||
lash->init( APP_NAME, APP_TITLE, &argc, &argv ); | |||||
lash->init( jack_name, APP_TITLE, &argc, &argv ); | |||||
MESSAGE( "Starting GUI" ); | MESSAGE( "Starting GUI" ); | ||||