Changeset 3237:ea0a2c70c0cd in roaraudio for libroarsndio


Ignore:
Timestamp:
01/27/10 21:17:16 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

support nonblocking mode

Location:
libroarsndio
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libroarsndio/libroarsndio.c

    r2575 r3237  
    149149 } 
    150150 
     151 hdl->nonblock = nbio_flag; 
     152 
    151153 return hdl; 
    152154} 
  • libroarsndio/stream.c

    r2843 r3237  
    9292 ROAR_DBG("sio_start(hdl=%p): rate=%i, channels=%i, bits=%i, codec=%i", hdl, _i(rate), _i(channels), _i(bits), _i(codec)); 
    9393 
     94 if ( hdl->nonblock ) { 
     95  if ( roar_vio_nonblock(&(hdl->svio), ROAR_SOCKET_NONBLOCK) == -1 ) { 
     96   roar_vio_close(&(hdl->svio)); 
     97   return 0; 
     98  } 
     99 } 
     100 
    94101 send_vol_event(hdl); 
    95102 
Note: See TracChangeset for help on using the changeset viewer.