Changeset 2813:f677c459d89d in roaraudio for roarclients/roarmon.c


Ignore:
Timestamp:
09/29/09 18:00:18 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added prethru support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarmon.c

    r2712 r2813  
    4444        "  --rdtcs              - Output Radio Data and Transmitter Control System data\n" 
    4545        "  --thru               - Output copy of other stream\n" 
     46        "  --prethru            - Sets prethru flag on stream\n" 
    4647        "  --rel-id ID          - Set ID of relative stream\n" 
    4748        "  --help               - Show this help\n" 
     
    6061 char * k; 
    6162 int    i; 
     63 int    prethru  = 0; 
    6264 struct roar_connection    con; 
    6365 struct roar_stream        s; 
     
    112114   rel_id = atoi(argv[++i]); 
    113115 
     116  } else if ( !strcmp(k, "--prethru") ) { 
     117   prethru = 1; 
     118 
    114119  } else if ( !strcmp(k, "--help") || !strcmp(k, "-h") ) { 
    115120   usage(); 
     
    194199 } 
    195200 
     201 if ( prethru ) { 
     202  if ( roar_stream_set_flags(&con, &s, ROAR_FLAG_PRETHRU, 0) == -1 ) { 
     203   fprintf(stderr, "Error: can not set prethru flag on stream\n"); 
     204   roar_disconnect(&con); 
     205   return 14; 
     206  } 
     207 } 
     208 
    196209 if ( roar_stream_exec(&con, &s) == -1 ) { 
    197210  fprintf(stderr, "Error: can not exec stream\n"); 
Note: See TracChangeset for help on using the changeset viewer.