Changeset 960:618277a7056e in roaraudio for roard
- Timestamp:
- 12/08/08 21:58:59 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/driver_ao.c
r958 r960 44 44 int driver; 45 45 46 ROAR_WARN("The libao driver is obsolete, use another!"); 47 46 48 if ( fh != -1 ) 47 49 return -1; … … 62 64 format.channels = info->channels; 63 65 format.rate = info->rate; 64 format.byte_format = AO_FMT_NATIVE; 66 67 if ( info->bits == 8 ) { 68 ROAR_WARN("This is the libao driver in 8 bit mode, It's not known to me if I need to provide data in signed or in unsigned mode. If your musik sounds strange try -oO codec=pcm_s_le or -oO codec=pcm_u_le"); 69 /* NOTE: the following is only true for EsounD driver, not for OSS driver, don't know for the others 70 switch (info->codec) { 71 case ROAR_CODEC_PCM_U_LE: 72 case ROAR_CODEC_PCM_U_BE: 73 case ROAR_CODEC_PCM_U_PDP: 74 format.byte_format = AO_FMT_NATIVE; 75 break; 76 default: 77 ROAR_ERR("Can not open audio device via libao: codec not supported. You may want to try -oO codec=pcm_u_le or -oO codec=pcm,bits=16"); 78 driver_ao_uninit(); 79 return -1; 80 break; 81 } 82 */ 83 } 84 85 switch (info->codec) { 86 case ROAR_CODEC_PCM_S_LE: 87 format.byte_format = AO_FMT_LITTLE; 88 break; 89 case ROAR_CODEC_PCM_S_BE: 90 format.byte_format = AO_FMT_BIG; 91 break; 92 default: 93 ROAR_ERR("Can not open audio device via libao: codec not supported. You may want to try -oO codec=pcm"); 94 driver_ao_uninit(); 95 return -1; 96 break; 97 } 65 98 66 99 aodevice = ao_open_live(driver, &format, NULL /* no options */);
Note: See TracChangeset
for help on using the changeset viewer.