Changeset 5258:0cad86d3054f in roaraudio


Ignore:
Timestamp:
11/13/11 23:35:07 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

avoid roar_simple_stream_obj()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroaresd/esdstream.c

    r5226 r5258  
    5252 
    5353static int libroaresd_stream(esd_format_t format, int rate, const char *host, const char *name, int dir) { 
     54 struct roar_vio_calls  calls; 
    5455 int channels; 
    5556 int bits; 
    5657 int codec = ROAR_CODEC_DEFAULT; 
    57  struct roar_stream     s; 
     58 int fh; 
     59 int ret = -1; 
    5860 
    5961 if ( (format & ESD_BITS16) ) { 
     
    7072 } 
    7173 
    72  return roar_simple_stream_obj(&s, rate, channels, bits, codec, (char*)host, dir, (char*)name); 
     74 if ( roar_vio_simple_stream(&calls, rate, channels, bits, codec, host, dir, name) == -1 ) 
     75  return -1; 
     76 
     77 if ( roar_vio_ctl(&calls, ROAR_VIO_CTL_GET_FH, &fh) != -1 ) 
     78  if ( fh != -1 ) 
     79   ret = dup(fh); 
     80 
     81 roar_vio_close(&calls); 
     82 
     83 return ret; 
    7384} 
    7485 
Note: See TracChangeset for help on using the changeset viewer.