Changeset 1808:073dbd2723d0 in roaraudio


Ignore:
Timestamp:
05/22/09 18:05:08 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added --wave, --midi, --light and --thru (only roarmon) to roarcat/roarmon

Location:
roarclients
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarcat.c

    r1635 r1808  
    3737        "  --chans -C  CHANNELS  - Set number of channels\n" 
    3838        "  --codec     CODEC     - Set the codec\n" 
     39        "  --wave                - Use Wave Audio (PCM) as input\n" 
     40        "  --midi                - Use MIDI Audio as input\n" 
     41        "  --light               - Use light control input\n" 
    3942        "  --help                - Show this help\n" 
    4043       ); 
     
    4750 int    channels = ROAR_CHANNELS_DEFAULT; 
    4851 int    codec    = ROAR_CODEC_DEFAULT; 
     52 int    dir      = ROAR_DIR_PLAY; 
    4953 char * server   = NULL; 
    5054 char * k; 
     
    7478  } else if ( !strcmp(k, "--codec") ) { 
    7579   codec = roar_str2codec(argv[++i]); 
     80 
     81  } else if ( !strcmp(k, "--wave") ) { 
     82   dir   = ROAR_DIR_PLAY; 
     83  } else if ( !strcmp(k, "--midi") ) { 
     84   dir   = ROAR_DIR_MIDI_IN; 
     85  } else if ( !strcmp(k, "--light") ) { 
     86   dir   = ROAR_DIR_LIGHT_IN; 
     87 
    7688  } else if ( !strcmp(k, "--help") || !strcmp(k, "-h") ) { 
    7789   usage(); 
     
    89101 } 
    90102 
    91  if ( (fh = roar_simple_play(rate, channels, bits, codec, server, name)) == -1 ) { 
     103 if ( (fh = roar_simple_stream(rate, channels, bits, codec, server, dir, name)) == -1 ) { 
    92104  fprintf(stderr, "Error: can not start playback\n"); 
    93105  return 1; 
  • roarclients/roarmon.c

    r1635 r1808  
    3737        "  --chans -C CHANNELS  - Set number of channels\n" 
    3838        "  --codec    CODEC     - Set the codec\n" 
     39        "  --wave               - Output Wave Audio (PCM)\n" 
     40        "  --midi               - Output MIDI Audio\n" 
     41        "  --light              - Output light control\n" 
     42        "  --thru               - Output copy of other stream\n" 
    3943        "  --help               - Show this help\n" 
    4044       ); 
     
    4751 int    channels = ROAR_CHANNELS_DEFAULT; 
    4852 int    codec    = ROAR_CODEC_DEFAULT; 
     53 int    dir      = ROAR_DIR_MONITOR; 
    4954 char * server   = NULL; 
    5055 char * k; 
     
    7378  } else if ( !strcmp(k, "--codec") ) { 
    7479   codec = roar_str2codec(argv[++i]); 
     80 
     81  } else if ( !strcmp(k, "--wave") ) { 
     82   dir   = ROAR_DIR_MONITOR; 
     83  } else if ( !strcmp(k, "--midi") ) { 
     84   dir   = ROAR_DIR_MIDI_OUT; 
     85  } else if ( !strcmp(k, "--light") ) { 
     86   dir   = ROAR_DIR_LIGHT_OUT; 
     87  } else if ( !strcmp(k, "--thru") ) { 
     88   dir   = ROAR_DIR_THRU; 
     89 
    7590  } else if ( !strcmp(k, "--help") || !strcmp(k, "-h") ) { 
    7691   usage(); 
     
    91106  out = ROAR_STDOUT; 
    92107 
    93  if ( (fh = roar_simple_monitor(rate, channels, bits, codec, server, "roarmon")) == -1 ) { 
     108 if ( (fh = roar_simple_stream(rate, channels, bits, codec, server, dir, "roarmon")) == -1 ) { 
    94109  fprintf(stderr, "Error: can not start monitoring\n"); 
    95110  return 1; 
Note: See TracChangeset for help on using the changeset viewer.