Browse Source

Use exact JACK client name in LASH initialization.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
4cf94d8f1d
3 changed files with 9 additions and 6 deletions
  1. +3
    -3
      Timeline/Engine/Engine.C
  2. +1
    -1
      Timeline/Engine/Engine.H
  3. +5
    -2
      Timeline/main.C

+ 3
- 3
Timeline/Engine/Engine.C View File

@@ -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


+ 1
- 1
Timeline/Engine/Engine.H View File

@@ -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 ); }


+ 5
- 2
Timeline/main.C View File

@@ -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" );



Loading…
Cancel
Save