From 448c8cfaf42930a704477081bafb72645e1e8206 Mon Sep 17 00:00:00 2001 From: Torben Hohn Date: Tue, 31 Mar 2009 01:47:01 +0200 Subject: [PATCH] [jack] make port to connect to configurable via environment variables --- flashsupport.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/flashsupport.c b/flashsupport.c index b6f84e7..e001142 100644 --- a/flashsupport.c +++ b/flashsupport.c @@ -1159,6 +1159,8 @@ static void *FPX_SoundOutput_Open(void) { int jack_rate; int flash_frames; size_t bufsize; + char *connect_port_1 = getenv( "JACK_FLASH_PORT_1" ); + char *connect_port_2 = getenv( "JACK_FLASH_PORT_2" ); /* Unfortunately we cannot report any useful error string back to * Flash. It would be highly preferable if Flash supported some @@ -1197,9 +1199,9 @@ static void *FPX_SoundOutput_Open(void) { jack_activate( p->client ); snprintf( namebuf, 99, "%s:out1", jack_get_client_name( p->client ) ); - jack_connect( p->client, namebuf, "system:playback_1" ); + jack_connect( p->client, namebuf, (connect_port_1 != NULL) ? connect_port_1 : "system:playback_1" ); snprintf( namebuf, 99, "%s:out2", jack_get_client_name( p->client ) ); - jack_connect( p->client, namebuf, "system:playback_2" ); + jack_connect( p->client, namebuf, (connect_port_2 != NULL) ? connect_port_2 : "system:playback_1" ); return p; -- 2.11.4.GIT