Changeset 945:d65997b421d1 in roaraudio


Ignore:
Timestamp:
12/07/08 23:07:14 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

changed the way the number of channels is set and added some error messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/driver_oss.c

    r942 r945  
    5454 roar_vio_set_fh(inst, fh); 
    5555 
     56 
     57 
     58#ifdef SNDCTL_DSP_CHANNELS 
     59 tmp = info->channels; 
     60 
     61 if ( ioctl(fh, SNDCTL_DSP_CHANNELS, &tmp) == -1 ) { 
     62  ROAR_ERR("driver_oss_open(*): can not set number of channels"); 
     63  er(); 
     64 } 
     65 
     66 if ( tmp != info->channels ) { 
     67   ROAR_ERR("driver_oss_open(*): can not set requested numer of channels, OSS suggested %i channels, to use this restart with -oO channels=%i or set codec manuelly via -oO channels=num", tmp, tmp); 
     68  er(); 
     69 } 
     70#else 
    5671 switch (info->channels) { 
    5772  case  1: tmp = 0; break; 
     
    6176 
    6277 if ( ioctl(fh, SNDCTL_DSP_STEREO, &tmp) == -1 ) { 
     78  ROAR_ERR("driver_oss_open(*): can not set number of channels"); 
    6379  er(); 
    6480 } 
     81#endif 
    6582 
    6683 switch (info->codec) { 
Note: See TracChangeset for help on using the changeset viewer.