Changeset 2846:1b451c172df6 in roaraudio


Ignore:
Timestamp:
10/04/09 01:29:03 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

sysio -> vio

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarfilt.c

    r2292 r2846  
    143143 char * server   = NULL; 
    144144 char * k; 
    145  int    fh; 
    146145 int    i; 
    147146 int    mul = 1, div = 1; 
     
    154153 struct roardsp_filter    * filter = filter_real - 1; 
    155154 struct roar_stream         stream; 
     155 struct roar_vio_calls      svio; 
    156156 
    157157#ifdef ROAR_HAVE_LIBM 
     
    233233 } 
    234234 
    235  if ( (fh = roar_simple_filter(rate, channels, bits, codec, server, "roarfilt")) == -1 ) { 
     235 if ( roar_vio_simple_stream(&svio, rate, channels, bits, codec, server, ROAR_DIR_FILTER, "roarfilt") == -1 ) { 
    236236  fprintf(stderr, "Error: can not start playback\n"); 
    237237  return 1; 
     
    248248 
    249249 if ( bits == 16 ) { 
    250   while((i = read(fh, buf, BUFSIZE))) { 
     250  while((i = roar_vio_read(&svio, buf, BUFSIZE))) { 
    251251   if ( mul != div ) 
    252252    vol2((void*)buf, mul, div, i); 
     
    258258#endif 
    259259   roardsp_fchain_calc(&fc, (void*)buf, (8*i)/bits); 
    260    if (write(fh, buf, i) != i) 
     260   if (roar_vio_write(&svio, buf, i) != i) 
    261261    break; 
    262262  } 
    263263 } else if ( bits == 8 ) { 
    264   while((i = read(fh, buf, BUFSIZE))) { 
     264  while((i = roar_vio_read(&svio, buf, BUFSIZE))) { 
    265265   vol1((void*)buf, mul, div, i); 
    266    if (write(fh, buf, i) != i) 
     266   if (roar_vio_write(&svio, buf, i) != i) 
    267267    break; 
    268268  } 
     
    272272 } 
    273273 
    274  roar_simple_close(fh); 
     274 roar_vio_close(&svio); 
    275275 
    276276 roardsp_fchain_uninit(&fc); 
Note: See TracChangeset for help on using the changeset viewer.