Changeset 5533:42f48072307c in roaraudio for roarclients/roarphone.c


Ignore:
Timestamp:
06/12/12 14:39:40 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Fixed usage of -R/-B/-C/-E as well as --aiprofile in roarclients (Closes: #176)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarphone.c

    r5381 r5533  
    114114 
    115115 printf("\nAudio Options:\n\n"); 
    116  printf("  --rate     RATE      - Set sample rate\n" 
    117         "  --bits     BITS      - Set bits per sample\n" 
    118         "  --chans    CHANNELS  - Set number of channels\n" 
     116 printf("  --rate  -R RATE      - Set sample rate\n" 
     117        "  --bits  -B BITS      - Set bits per sample\n" 
     118        "  --chans -C CHANNELS  - Set number of channels\n" 
     119        "  --aiprofile PROFILE  - Set audio profile\n" 
    119120       ); 
    120121 
     
    129130 
    130131 printf("\nCodec Options:\n\n"); 
    131  printf("  --codec   CODEC     - Set the codec\n" 
     132 printf("  --codec -E CODEC     - Set the codec\n" 
    132133        "  --transcode          - Use local transcodeing\n" 
    133134       ); 
     
    436437  } else if ( strcmp(k, "--io-flush") == 0 ) { 
    437438   g_conf.ioflush_interval = atoi(argv[++i]); 
    438   } else if ( strcmp(k, "--rate") == 0 ) { 
     439  } else if ( strcmp(k, "--rate") == 0 || strcmp(k, "-R") == 0 ) { 
    439440   info.rate = roar_str2rate(argv[++i]); 
    440   } else if ( strcmp(k, "--bits") == 0 ) { 
     441  } else if ( strcmp(k, "--bits") == 0 || strcmp(k, "-B") == 0 ) { 
    441442   info.bits = roar_str2bits(argv[++i]); 
    442   } else if ( strcmp(k, "--channels") == 0 || strcmp(k, "--chans") == 0 ) { 
     443  } else if ( strcmp(k, "--channels") == 0 || strcmp(k, "--chans") == 0 || strcmp(k, "-C") == 0 ) { 
    443444   info.channels = roar_str2channels(argv[++i]); 
     445  } else if ( !strcmp(k, "--aiprofile") ) { 
     446   if ( roar_profile2info(&info, argv[++i]) == -1 ) { 
     447    fprintf(stderr, "Error: Can not load audio profile: %s: %s\n", argv[i], roar_error2str(roar_error)); 
     448    return 1; 
     449   } 
    444450 
    445451  } else if ( strcmp(k, "--afi-downmix") == 0 ) { 
     
    459465   g_conf.filter.in.speex_prep_vad = 1; 
    460466 
    461   } else if ( strcmp(k, "--codec") == 0 ) { 
     467  } else if ( strcmp(k, "--codec") == 0 || strcmp(k, "-E") == 0 ) { 
    462468   info.codec = roar_str2codec(argv[++i]); 
    463469 
Note: See TracChangeset for help on using the changeset viewer.