Changeset 2843:c25179bbac4d in roaraudio for libroarsndio


Ignore:
Timestamp:
10/03/09 18:49:50 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

open stream using new function, this is more OS independed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroarsndio/stream.c

    r2574 r2843  
    7777#define _i(x) (hdl->info.x) 
    7878int    sio_start  (struct sio_hdl * hdl) { 
    79 #ifndef ROAR_TARGET_WIN32 
    80  int fh; 
    81 #endif 
    8279 
    8380 // TODO: FIXME: use full VIO support here, not fh->vio! 
     
    8986  return 0; 
    9087 
    91 #ifndef ROAR_TARGET_WIN32 
    92  if ( (fh = roar_simple_new_stream_obj(&(hdl->con), &(hdl->stream), _i(rate), _i(channels), _i(bits), _i(codec), hdl->dir)) == -1 ) 
     88 if ( roar_vio_simple_new_stream_obj(&(hdl->svio), &(hdl->con), &(hdl->stream), 
     89                                     _i(rate), _i(channels), _i(bits), _i(codec), hdl->dir) == -1 ) 
    9390  return 0; 
    9491 
    9592 ROAR_DBG("sio_start(hdl=%p): rate=%i, channels=%i, bits=%i, codec=%i", hdl, _i(rate), _i(channels), _i(bits), _i(codec)); 
    9693 
    97  if ( roar_vio_open_fh_socket(&(hdl->svio), fh) == -1 ) { 
    98   close(fh); 
    99   return 0; 
    100  } 
    101  
    10294 send_vol_event(hdl); 
    103 #else 
    104  if ( roar_stream_new_by_id(&(hdl->stream), -1) == -1 ) 
    105   return 0; 
    106  
    107  if (roar_vio_simple_stream(&(hdl->svio),  _i(rate), _i(channels), _i(bits), _i(codec), NULL, hdl->dir, "libroarsndio(win32)") == -1 ) { 
    108   return 0; 
    109  } 
    110  
    111  // FIXME: this does not work in this case 
    112  //send_vol_event(hdl); 
    113 #endif 
    11495 
    11596 hdl->stream_opened = 1; 
Note: See TracChangeset for help on using the changeset viewer.