Changeset 5289:ddb3677af4d0 in roaraudio for libroar/vs.c


Ignore:
Timestamp:
11/22/11 14:47:44 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

use support to set mixer ID up at least one API layer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/vs.c

    r5270 r5289  
    338338 ret = roar_vio_simple_new_stream_obj(&(vss->vio), vss->con, &(vss->stream), 
    339339                                      info->rate, info->channels, info->bits, info->codec, 
    340                                       dir 
     340                                      dir, vss->mixerid 
    341341                                     ); 
    342342 
     
    351351 } 
    352352 
    353  if ( roar_stream_get_info(vss->con, &(vss->stream), &sinfo) != -1 ) { 
    354   // TODO: fix this: 
    355   // as we currently do not support to select mixer we just check if we hit the 
    356   // right one. 
    357   if ( vss->mixerid != -1 && vss->mixerid != sinfo.mixer ) { 
    358    _seterr(ROAR_ERROR_INVAL); // TODO: should we maybe use a diffrent value? 
    359    roar_vio_close(vss->vio_ptr); 
    360    return -1; 
    361   } 
    362  
    363   vss->mixerid = sinfo.mixer; 
     353 if ( vss->mixerid != -1 ) { 
     354  if ( roar_stream_get_info(vss->con, &(vss->stream), &sinfo) != -1 ) { 
     355   vss->mixerid = sinfo.mixer; 
     356  } 
     357 } 
     358 
     359 if ( vss->mixerid != -1 ) 
    364360  _roar_vs_find_first_prim(vss); 
    365  } 
    366361 
    367362 vss->flags |= FLAG_STREAM; 
Note: See TracChangeset for help on using the changeset viewer.