diff --git a/Timeline/Engine/Engine.C b/Timeline/Engine/Engine.C index 54d4b3f..ec30ee0 100644 --- a/Timeline/Engine/Engine.C +++ b/Timeline/Engine/Engine.C @@ -270,11 +270,11 @@ Engine::shutdown ( void ) /** Connect to JACK */ -int +const char * Engine::init ( void ) { 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 ) @@ -301,7 +301,7 @@ Engine::init ( void ) timeline->_sample_rate = frame_rate(); /* we don't need to create any ports until tracks are created */ - return 1; + return jack_get_client_name( _client ); } void diff --git a/Timeline/Engine/Engine.H b/Timeline/Engine/Engine.H index aba86a2..a7cd06d 100644 --- a/Timeline/Engine/Engine.H +++ b/Timeline/Engine/Engine.H @@ -74,7 +74,7 @@ public: Engine ( ); - int init ( void ); + const char * init ( void ); nframes_t nframes ( void ) const { return jack_get_buffer_size( _client ); } float frame_rate ( void ) const { return jack_get_sample_rate( _client ); } diff --git a/Timeline/main.C b/Timeline/main.C index 018f612..f0f3de4 100644 --- a/Timeline/main.C +++ b/Timeline/main.C @@ -123,7 +123,10 @@ main ( int argc, char **argv ) /* we don't really need a pointer for this */ engine = new Engine; - if ( ! engine->init() ) + + const char *jack_name; + + if ( ! ( jack_name = engine->init() ) ) FATAL( "Could not connect to JACK!" ); /* always start stopped (please imagine for me a realistic @@ -133,7 +136,7 @@ main ( int argc, char **argv ) MESSAGE( "Initializing LASH" ); lash = new LASH; - lash->init( APP_NAME, APP_TITLE, &argc, &argv ); + lash->init( jack_name, APP_TITLE, &argc, &argv ); MESSAGE( "Starting GUI" );