diff options
author | David Robillard <d@drobilla.net> | 2018-09-29 11:24:30 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-11-10 11:45:15 +0100 |
commit | 677b06dfc2d8a8b361572d1dbee9c763823f8e9b (patch) | |
tree | 7341793e3501cd5461f67aa39a59416e569f1bf1 | |
parent | 663506bcc2ce237c2bd42d1aa24a3d47d60393b6 (diff) | |
download | jalv-677b06dfc2d8a8b361572d1dbee9c763823f8e9b.tar.gz jalv-677b06dfc2d8a8b361572d1dbee9c763823f8e9b.tar.bz2 jalv-677b06dfc2d8a8b361572d1dbee9c763823f8e9b.zip |
Separate Jack client creation from backend initialisation
-rw-r--r-- | src/jack.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -313,8 +313,8 @@ jack_session_cb(jack_session_event_t* event, void* arg) } #endif /* JALV_JACK_SESSION */ -JalvBackend* -jalv_backend_init(Jalv* jalv) +static jack_client_t* +jack_create_client(Jalv* jalv) { jack_client_t* client = NULL; @@ -355,6 +355,16 @@ jalv_backend_init(Jalv* jalv) } free(jack_name); + + return client; +} + +JalvBackend* +jalv_backend_init(Jalv* jalv) +{ + jack_client_t* const client = + jalv->backend ? jalv->backend->client : jack_create_client(jalv); + if (!client) { return NULL; } |