Changeset 1175:96c01dfee3de in roaraudio


Ignore:
Timestamp:
01/24/09 20:59:56 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added support to set the default driver at compile time

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • configure

    r1173 r1175  
    5858EXEC_HELPER='' 
    5959 
     60ROAR_DRIVER_DEFAULT='' 
     61 
    6062echo -n "checking for C compiler... " 
    6163if [ "$CC" != '' ] 
     
    116118   echo '--default-channels CHANNELS - Set default number of channels for roard and roarclients' 
    117119   echo '--default-bits BITS         - Set default number of bits per sample for roard and roarclients' 
     120   echo '--default-driver DRIVER     - Set default driver for roard' 
    118121   echo 
    119122   echo '--without-alaw              - Disable support of A-Law codec (de- and encoding)' 
     
    186189  '--default-bits') 
    187190   DEFAULT_BITS="$2" 
     191   shift; 
     192  ;; 
     193  '--default-driver') 
     194   ROAR_DRIVER_DEFAULT="$2" 
    188195   shift; 
    189196  ;; 
     
    434441 echo '/* Date : ' $(date)  '*/' 
    435442 echo 
    436  [ "$DEFAULT_RATE"     = '' ] || echo "#define ROAR_RATE_DEFAULT     $DEFAULT_RATE" 
    437  [ "$DEFAULT_CHANNELS" = '' ] || echo "#define ROAR_CHANNELS_DEFAULT $DEFAULT_CHANNELS" 
    438  [ "$DEFAULT_BITS"     = '' ] || echo "#define ROAR_BITS_DEFAULT     $DEFAULT_BITS" 
     443 [ "$DEFAULT_RATE"        = '' ] || echo "#define ROAR_RATE_DEFAULT     $DEFAULT_RATE" 
     444 [ "$DEFAULT_CHANNELS"    = '' ] || echo "#define ROAR_CHANNELS_DEFAULT $DEFAULT_CHANNELS" 
     445 [ "$DEFAULT_BITS"        = '' ] || echo "#define ROAR_BITS_DEFAULT     $DEFAULT_BITS" 
     446 [ "$ROAR_DRIVER_DEFAULT" = '' ] || echo "#define ROAR_DRIVER_DEFAULT   \"$ROAR_DRIVER_DEFAULT\"" 
    439447 echo 
    440448 $ALAW     && echo '#define ROAR_SUPPORT_ALAW' 
  • roard/include/driver.h

    r950 r1175  
    3030#define DRIVER_USERDATA_T void * 
    3131 
     32#ifndef ROAR_DRIVER_DEFAULT 
    3233#ifdef ROAR_HAVE_ESD 
    3334#define ROAR_DRIVER_DEFAULT "esd" 
     
    4344 
    4445#define ROAR_DRIVER_DEFAULT "null" 
     46#endif 
    4547#endif 
    4648#endif 
Note: See TracChangeset for help on using the changeset viewer.