Changeset 1610:277836edc5e0 in roaraudio


Ignore:
Timestamp:
04/25/09 12:34:47 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

try to handle VIO streams

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/streams.c

    r1609 r1610  
    243243 ROAR_DBG("streams_set_fh(id=%i, fh=%i): driverID=%i", id, fh, ss->driver_id); 
    244244 
    245  if ( ss->driver_id == -1 ) 
     245 if ( ss->driver_id == -1 && fh != -2 ) 
    246246  roar_vio_set_fh(&(ss->vio), fh); 
    247247 
     
    251251 } 
    252252 
    253  if ( fh == -1 ) { // yes, this is valid, indecats full vio! 
     253 if ( fh == -2 ) { 
     254  ROAR_DBG("streams_set_fh(id=%i, fh=%i) = ?", id, fh); 
     255  if ( roar_vio_ctl(&(ss->vio), ROAR_VIO_CTL_GET_READ_FH, &fh) == -1 ) { 
     256   fh = -2; 
     257  } else { 
     258   ROAR_DBG("streams_set_fh(id=%i, fh=%i) = ?", id, fh); 
     259   if ( fh < 0 ) { 
     260    fh = -2; 
     261   } else { 
     262    ROAR_STREAM(g_streams[id])->fh = fh; 
     263   } 
     264  } 
     265 } 
     266 
     267 if ( fh == -1 || fh == -2 ) { // yes, this is valid, indecats full vio! 
    254268  return 0; 
    255269 } 
Note: See TracChangeset for help on using the changeset viewer.