Changeset 4885:01d694a7fdf7 in roaraudio for roarclients/roarshout.c


Ignore:
Timestamp:
04/28/11 17:28:25 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Some cleanup of roarclients to fix ckport warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarshout.c

    r4757 r4885  
    105105 char * s_url    = NULL; 
    106106 int    s_public = 0; 
    107  int    fh; 
     107 roar_vs_t * vss; 
     108 int    err; 
     109 ssize_t ret; 
    108110 int    i; 
    109111 char buf[BUFSIZE]; 
     
    252254  shout_set_url(shout, s_url); 
    253255 
    254  if ( (fh = roar_simple_monitor(rate, channels, bits, codec, server, "roarshout")) == -1 ) { 
    255   fprintf(stderr, "Error: can not start monitoring\n"); 
     256 if ( (vss = roar_vs_new_simple(server, "roarshout", rate, channels, codec, bits, ROAR_DIR_MONITOR, &err)) == NULL ) { 
     257  fprintf(stderr, "Error: can not start monitoring: %s\n", roar_vs_strerr(err)); 
    256258  return 1; 
    257259 } 
     
    262264 } 
    263265 
    264  while((i = read(fh, buf, BUFSIZE))) 
     266 while((ret = roar_vs_read(vss, buf, BUFSIZE, NULL))) 
    265267  if (shout_send(shout, (unsigned char*)buf, i) != SHOUTERR_SUCCESS) 
    266268   break; 
    267269 
    268  roar_simple_close(fh); 
     270 roar_vs_close(vss, ROAR_VS_TRUE, NULL); 
    269271 
    270272 shout_sync(shout); 
Note: See TracChangeset for help on using the changeset viewer.