Changeset 1530:570f7a39d6d0 in roaraudio


Ignore:
Timestamp:
04/12/09 00:39:36 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added warning if device uses diffrent sample rate, added support for ROAR_VIO_CTL_GET_SSTREAMID

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/driver_oss.c

    r1527 r1530  
    3535 int need_config; 
    3636 struct roar_stream_server * stream; 
     37 int ssid; 
    3738}; 
    3839 
     
    221222 } 
    222223 
    223  if ( tmp < info->rate * 0.98 || tmp > info->rate * 1.02 ) { 
    224   ROAR_ERR("driver_oss_open(*): sample rate out of acceptable accuracy"); 
    225   return -1; 
     224 if ( tmp != info->rate ) { 
     225  ROAR_WARN("driver_oss_config_device(*): Device does not support requested sample rate: req=%iHz, sug=%iHz", 
     226                    info->rate, tmp); 
     227 
     228  if ( tmp < info->rate * 0.98 || tmp > info->rate * 1.02 ) { 
     229   ROAR_ERR("driver_oss_open(*): sample rate out of acceptable accuracy"); 
     230   return -1; 
     231  } 
    226232 } 
    227233 
     
    279285 memcpy(&(self->info), info, sizeof(struct roar_audio_info)); 
    280286 
    281  self->fh = fh; 
     287 self->ssid = -1; 
     288 self->fh   = fh; 
    282289 
    283290 if ( device != NULL ) 
     
    384391    *(uint_least32_t *)data = self->blocksize; 
    385392   break; 
     393  case ROAR_VIO_CTL_GET_SSTREAMID: 
     394    self->ssid = *(int *)data; 
     395   break; 
    386396  case ROAR_VIO_CTL_SET_SSTREAM: 
    387397    self->stream = data; 
Note: See TracChangeset for help on using the changeset viewer.