Changeset 2846:1b451c172df6 in roaraudio for roarclients/roarfilt.c
- Timestamp:
- 10/04/09 01:29:03 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roarclients/roarfilt.c
r2292 r2846 143 143 char * server = NULL; 144 144 char * k; 145 int fh;146 145 int i; 147 146 int mul = 1, div = 1; … … 154 153 struct roardsp_filter * filter = filter_real - 1; 155 154 struct roar_stream stream; 155 struct roar_vio_calls svio; 156 156 157 157 #ifdef ROAR_HAVE_LIBM … … 233 233 } 234 234 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 ) { 236 236 fprintf(stderr, "Error: can not start playback\n"); 237 237 return 1; … … 248 248 249 249 if ( bits == 16 ) { 250 while((i = r ead(fh, buf, BUFSIZE))) {250 while((i = roar_vio_read(&svio, buf, BUFSIZE))) { 251 251 if ( mul != div ) 252 252 vol2((void*)buf, mul, div, i); … … 258 258 #endif 259 259 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) 261 261 break; 262 262 } 263 263 } else if ( bits == 8 ) { 264 while((i = r ead(fh, buf, BUFSIZE))) {264 while((i = roar_vio_read(&svio, buf, BUFSIZE))) { 265 265 vol1((void*)buf, mul, div, i); 266 if ( write(fh, buf, i) != i)266 if (roar_vio_write(&svio, buf, i) != i) 267 267 break; 268 268 } … … 272 272 } 273 273 274 roar_ simple_close(fh);274 roar_vio_close(&svio); 275 275 276 276 roardsp_fchain_uninit(&fc);
Note: See TracChangeset
for help on using the changeset viewer.