Changeset 4141:b36fa38ea35e in roaraudio
- Timestamp:
- 08/12/10 15:26:59 (14 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- roard
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/include/driver.h
r3839 r4141 31 31 #define DRIVER_USERDATA_T void * 32 32 33 #if 0 33 34 #ifndef ROAR_DRIVER_DEFAULT 34 35 … … 55 56 #endif 56 57 58 #endif 57 59 #endif 58 60 -
roard/roard.c
r4140 r4141 43 43 #endif 44 44 45 int add_output (char * drv, char * dev, char * opts, int prim, int count); 46 45 47 #ifdef ROAR_HAVE_MAIN_ARGS 46 48 void usage (void) { … … 93 95 94 96 printf("\nDriver Options: (obsolete, do not use, Use Ouput Options)\n\n"); 97 #ifdef ROAR_DRIVER_DEFAULT 95 98 printf(" -d --driver DRV - Set the driver (default: %s)\n", ROAR_DRIVER_DEFAULT); 99 #else 100 printf(" -d --driver DRV - Set the driver (default: autodetect)\n"); 101 #endif 96 102 printf(" -D --device DEV - Set the device\n"); 97 103 printf(" -dO OPTS - Set output options\n"); … … 738 744 #else 739 745 int add_default_output (char * drv, char * dev, char * opts, int prim, int count) { 740 char drvs[] = {746 char * drvs[] = { 741 747 #if defined(ROAR_HAVE_OSS_BSD) || defined(ROAR_HAVE_OSS) 742 748 "oss", … … 764 770 765 771 if ( dev != NULL ) { 766 ROAR_WARN("add_ output(drv=(none), dev='%s', opts='%s', prim=%i, count=%i): It's not recommended to use device name without driver name.", dev, opts, prim, count);772 ROAR_WARN("add_default_output(drv=(none), dev='%s', opts='%s', prim=%i, count=%i): It's not recommended to use device name without driver name.", dev, opts, prim, count); 767 773 } 768 774 769 775 for (i = 0; drvs[i] != NULL; i++) { 776 ROAR_INFO("add_default_output(*): trying driver %s", ROAR_DBG_INFO_INFO, drvs[i]); 770 777 ret = add_output(drvs[i], dev, opts, prim, count); 771 778 if ( ret != -1 ) 772 779 return ret; 780 ROAR_INFO("add_default_output(*): Driver %s faild to load", ROAR_DBG_INFO_VERBOSE, drvs[i]); 773 781 } 774 782 … … 798 806 799 807 if ( drv == NULL && count == 0 ) { 808 #ifdef ROAR_DRIVER_DEFAULT 800 809 drv = ROAR_DRIVER_DEFAULT; 801 810 prim = 1; … … 806 815 opts = to_free = strdup("codec=" ROAR_DRIVER_CODEC); 807 816 } 817 #endif 818 #else 819 ROAR_ERR("add_output(*): Can not find default driver"); 820 return -1; 808 821 #endif 809 822 } … … 1964 1977 #endif 1965 1978 1966 add_ output(o_drv, o_dev, o_opts, o_prim, o_count);1979 add_default_output(o_drv, o_dev, o_opts, o_prim, o_count); 1967 1980 1968 1981 ROAR_INFO("Server config: rate=%i, bits=%i, chans=%i", ROAR_DBG_INFO_NOTICE, sa.rate, sa.bits, sa.channels);
Note: See TracChangeset
for help on using the changeset viewer.