Changeset 5950:7fe8f5df7a83 in roaraudio for roarclients/roarcatplay.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/roarcatplay.c

    r5949 r5950  
    6464 
    6565  if ( strcmp(k, "--server") == 0 || strcmp(k, "-s") == 0 ) { 
     66   ROAR_CKHAVEARGS(1); 
    6667   server = argv[++i]; 
    6768  } else if ( strcmp(k, "--simple") == 0 ) { 
     
    7071   verbose++; 
    7172  } else if ( strcmp(k, "-n") == 0 ) { 
     73   ROAR_CKHAVEARGS(1); 
     74   i++; 
    7275   roar_debug_option_obsolete(argv[0], "-n", NULL, "Will ignore it for now."); 
    7376  } else if ( !strcmp(k, "--rate") || !strcmp(k, "-R") ) { 
     77   ROAR_CKHAVEARGS(1); 
    7478   info.rate = roar_str2rate(argv[++i]); 
    7579   auinfo_changed = 1; 
    7680  } else if ( !strcmp(k, "--bits") || !strcmp(k, "-B") ) { 
     81   ROAR_CKHAVEARGS(1); 
    7782   info.bits = roar_str2bits(argv[++i]); 
    7883   auinfo_changed = 1; 
    7984  } else if ( !strcmp(k, "--channels") || !strcmp(k, "--chans") || !strcmp(k, "-C") ) { 
     85   ROAR_CKHAVEARGS(1); 
    8086   info.channels = roar_str2channels(argv[++i]); 
    8187   auinfo_changed = 1; 
    8288  } else if ( !strcmp(k, "--codec") || !strcmp(k, "-E") ) { 
     89   ROAR_CKHAVEARGS(1); 
    8390   info.codec = roar_str2codec(argv[++i]); 
    8491   auinfo_changed = 1; 
    8592  } else if ( !strcmp(k, "--aiprofile") ) { 
     93   ROAR_CKHAVEARGS(1); 
    8694   if ( roar_profile2info(&info, argv[++i]) == -1 ) { 
    8795    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.