Changeset 5056:b31e60545552 in roaraudio for roard/driver_artsc.c


Ignore:
Timestamp:
06/02/11 23:13:11 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

support auto reconf bits=32->16 in case not supported (See: #48)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/driver_artsc.c

    r4809 r5056  
    5151int     driver_artsc_open_vio(struct roar_vio_calls * inst, char * device, struct roar_audio_info * info, int fh, struct roar_stream_server * sstream) { 
    5252 struct roar_artsc * self = NULL; 
     53 int autoconfig           = 0; 
    5354 
    5455 (void)sstream; 
     
    5657 if ( fh != -1 || device != NULL ) 
    5758  return -1; 
     59 
     60 if ( sstream != NULL ) { 
     61  autoconfig = streams_get_flag(ROAR_STREAM(sstream)->id, ROAR_FLAG_AUTOCONF); 
     62 } 
    5863 
    5964 self = roar_mm_malloc(sizeof(struct roar_artsc)); 
     
    7378 self->info   = info; 
    7479 self->stream = arts_play_stream(info->rate, info->bits, info->channels, "roard"); 
     80 
     81 if ( self->stream == NULL && autoconfig ) { 
     82  info->bits   = 16; 
     83  self->stream = arts_play_stream(info->rate, info->bits, info->channels, "roard"); 
     84 } 
    7585 
    7686 if ( self->stream == NULL ) { 
Note: See TracChangeset for help on using the changeset viewer.