Changeset 3237:ea0a2c70c0cd in roaraudio


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

support nonblocking mode

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • include/libroarsndio/libroarsndio.h

    r3236 r3237  
    6565 int                      stream_opened; 
    6666 int                      dir; 
     67 int                      nonblock; 
    6768 struct roar_vio_calls    svio; 
    6869 struct roar_connection   con; 
  • 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.