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

    r5823 r5950  
    179179 
    180180  if ( strcmp(k, "--server") == 0 ) { 
     181   ROAR_CKHAVEARGS(1); 
    181182   server = argv[++i]; 
    182183  } else if ( strcmp(k, "--rate") == 0 || strcmp(k, "-R") == 0 ) { 
     184   ROAR_CKHAVEARGS(1); 
    183185   info.rate = roar_str2rate(argv[++i]); 
    184186  } else if ( strcmp(k, "--bits") == 0 || strcmp(k, "-B") == 0 ) { 
     187   ROAR_CKHAVEARGS(1); 
    185188   info.bits = roar_str2bits(argv[++i]); 
    186189  } else if ( strcmp(k, "--channels") == 0 || strcmp(k, "--chans") == 0 || strcmp(k, "-C") == 0 ) { 
     190   ROAR_CKHAVEARGS(1); 
    187191   info.channels = roar_str2channels(argv[++i]); 
    188192  } else if ( !strcmp(k, "--aiprofile") ) { 
     193   ROAR_CKHAVEARGS(1); 
    189194   if ( roar_profile2info(&info, argv[++i]) == -1 ) { 
    190195    fprintf(stderr, "Error: Can not load audio profile: %s: %s\n", argv[i], roar_error2str(roar_error)); 
     
    192197   } 
    193198  } else if ( strcmp(k, "--samples") == 0 ) { 
     199   ROAR_CKHAVEARGS(1); 
    194200   samples = atoi(argv[++i]); 
    195201  } else if ( strcmp(k, "--db") == 0 ) { 
     
    204210   mode |= MODE_BEAT; 
    205211  } else if ( strcmp(k, "--lowpass") == 0 ) { 
     212   ROAR_CKHAVEARGS(1); 
    206213   lowpass_freq = atof(argv[++i]); 
    207214  } else if ( strcmp(k, "--help") == 0 ) { 
Note: See TracChangeset for help on using the changeset viewer.