Changeset 5950:7fe8f5df7a83 in roaraudio for roarclients/roarradio.c


Ignore:
Timestamp:
10/20/13 13:52:15 (11 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

code cleanup and again a patch for checking commandlion parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarradio.c

    r5823 r5950  
    7676 
    7777  if ( strcmp(k, "--server") == 0 ) { 
     78   ROAR_CKHAVEARGS(1); 
    7879   server = argv[++i]; 
    7980  } else if ( strcmp(k, "--rate") == 0 || strcmp(k, "-R") == 0 ) { 
     81   ROAR_CKHAVEARGS(1); 
    8082   info.rate = roar_str2rate(argv[++i]); 
    8183  } else if ( strcmp(k, "--bits") == 0 || strcmp(k, "-B") == 0 ) { 
     84   ROAR_CKHAVEARGS(1); 
    8285   info.bits = roar_str2bits(argv[++i]); 
    8386  } else if ( strcmp(k, "--channels") == 0 || strcmp(k, "--chans") == 0 || strcmp(k, "-C") == 0 ) { 
     87   ROAR_CKHAVEARGS(1); 
    8488   info.channels = roar_str2channels(argv[++i]); 
    8589  } else if ( strcmp(k, "--codec") == 0 || strcmp(k, "-E") == 0 ) { 
     90   ROAR_CKHAVEARGS(1); 
    8691   info.codec = roar_str2codec(argv[++i]); 
    8792  } else if ( !strcmp(k, "--aiprofile") ) { 
     93   ROAR_CKHAVEARGS(1); 
    8894   if ( roar_profile2info(&info, argv[++i]) == -1 ) { 
    8995    fprintf(stderr, "Error: Can not load audio profile: %s: %s\n", argv[i], roar_error2str(roar_error)); 
Note: See TracChangeset for help on using the changeset viewer.