Changeset 5289:ddb3677af4d0 in roaraudio for roarclients


Ignore:
Timestamp:
11/22/11 14:47:44 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

use support to set mixer ID up at least one API layer

Location:
roarclients
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarfilt.c

    r5180 r5289  
    244244 if ( roar_vio_simple_stream(&svio, 
    245245                             info.rate, info.channels, info.bits, info.codec, 
    246                              server, ROAR_DIR_FILTER, "roarfilt") == -1 ) { 
     246                             server, ROAR_DIR_FILTER, "roarfilt", -1) == -1 ) { 
    247247  fprintf(stderr, "Error: can not start playback\n"); 
    248248  return 1; 
  • roarclients/roarinterconnect.c

    r5238 r5289  
    322322       return 2; 
    323323    } 
    324     if ( roar_vio_simple_stream(&vio, rate, channels, bits, codec, remote, tmp, CLIENT_NAME) == -1 ) { 
     324    if ( roar_vio_simple_stream(&vio, rate, channels, bits, codec, remote, tmp, CLIENT_NAME, -1) == -1 ) { 
    325325     fprintf(stderr, "Error: can not open RoarAudio stream to %s: %s\n", remote, roar_error2str(roar_error)); 
    326326     return 2; 
  • roarclients/roarlight.c

    r4914 r5289  
    3535 
    3636 printf("  --server    SERVER    - Set server hostname\n" 
     37        "  --mixer     MIXERID   - ID of the light mixer to use\n" 
    3738        "  --help                - Show this help\n" 
    3839       ); 
     
    4647} 
    4748 
    48 int cmd_set (CONVAR, char * arg) { 
     49int cmd_set (CONVAR, char * arg, const int mixer) { 
    4950 char * next = arg; 
    5051 char * k, * v; 
     
    8081 if ( roar_vio_simple_new_stream_obj(&vio, con, NULL, 
    8182                                     ROAR_RATE_DEFAULT, ROAR_CHANNELS_DEFAULT, ROAR_BITS_DEFAULT, 
    82                                      ROAR_CODEC_ROARDMX, ROAR_DIR_LIGHT_IN) == -1 ) 
     83                                     ROAR_CODEC_ROARDMX, ROAR_DIR_LIGHT_IN, mixer) == -1 ) 
    8384  return -1; 
    8485 
     
    9495 
    9596int main (int argc, char * argv[]) { 
     97 struct roar_connection con; 
     98 int    mixer = -1; // -1 = Default 
    9699 char * server   = NULL; 
    97100 char * k; 
    98101 int    i; 
    99  struct roar_connection con; 
    100102 
    101103 for (i = 1; i < argc; i++) { 
     
    104106  if ( !strcmp(k, "--server") || !strcmp(k, "-s") ) { 
    105107   server = argv[++i]; 
     108  } else if ( !strcmp(k, "--mixer") ) { 
     109   mixer = atoi(argv[++i]); 
    106110  } else if ( !strcmp(k, "--codec") ) { 
    107111 
     
    142146  } else if ( !strcmp(k, "set") ) { 
    143147   i++; 
    144    if ( cmd_set(&con, argv[i]) == -1 ) { 
     148   if ( cmd_set(&con, argv[i], mixer) == -1 ) { 
    145149    fprintf(stderr, "Error: can not set channels\n"); 
    146150   } else { 
  • roarclients/roarphone.c

    r4883 r5289  
    168168 if ( (fh = roar_vio_simple_new_stream_obj(vio, &(g_cons.con), &(g_cons.stream), 
    169169                                           info->rate, info->channels, info->bits, info->codec, 
    170                                            ROAR_DIR_BIDIR 
     170                                           ROAR_DIR_BIDIR, -1 
    171171                                          )) == -1 ) 
    172172  return -1; 
  • roarclients/roarvumeter.c

    r5179 r5289  
    220220 } 
    221221 
    222  if ( roar_vio_simple_new_stream_obj(&stream, &con, &s, rate, channels, bits, codec, ROAR_DIR_MONITOR) == -1) { 
     222 if ( roar_vio_simple_new_stream_obj(&stream, &con, &s, rate, channels, bits, codec, ROAR_DIR_MONITOR, -1) == -1) { 
    223223  fprintf(stderr, "Error: can not start monetoring\n"); 
    224224  return 1; 
Note: See TracChangeset for help on using the changeset viewer.