Browse Source

Also restore connections when using jackpatch from the commandline for testing

tags/v1.6.0
Nils 3 years ago
parent
commit
0dc6623b6d
1 changed files with 9 additions and 4 deletions
  1. +9
    -4
      src/jackpatch.c

+ 9
- 4
src/jackpatch.c View File

@@ -229,7 +229,7 @@ process_patch ( const char *patch )


pr->active = 0; pr->active = 0;


print_patch( pr, 1 );
//print_patch( pr, 1 ); //very verbose


return 1; return 1;
} }
@@ -253,7 +253,7 @@ clear_all_patches ( )
int int
read_config ( const char *file ) read_config ( const char *file )
{ {
printf( "[jackpatch] Restoring connections from file %s \n", file);
printf( "[jackpatch] Reading connections from file %s \n", file);
FILE *fp; FILE *fp;
int i = 0; int i = 0;


@@ -337,7 +337,7 @@ connect_path ( struct patch_record *pr )


r = jack_connect( client, srcport, dstport ); r = jack_connect( client, srcport, dstport );


print_patch( pr, r );
//print_patch( pr, r ); //very verbose


if ( r == 0 || r == EEXIST ) if ( r == 0 || r == EEXIST )
{ {
@@ -838,7 +838,12 @@ main ( int argc, char **argv )
/** /**
* Enter standalone commandline mode. This is without NSM. * Enter standalone commandline mode. This is without NSM.
*/ */
read_config( argv[1] );
if ( read_config( argv[1] ) )
{
maybe_activate_jack_client();
register_prexisting_ports();
}

printf( "[jackpatch] Monitoring...\n" ); printf( "[jackpatch] Monitoring...\n" );
for ( ;; ) for ( ;; )
{ {


Loading…
Cancel
Save