Changeset 488:2ec5358c785e in roaraudio


Ignore:
Timestamp:
08/14/08 03:55:43 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

use optimal block size

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarcatad.c

    r288 r488  
    3030 struct roar_connection con; 
    3131 struct roar_stream     s; 
     32 struct roar_stream_info info; 
    3233 
    3334 
     
    6869 } 
    6970 
    70  while((i = read(0, buf, BUFSIZE))) 
     71 info.block_size = BUFSIZE; 
     72 
     73 roar_stream_get_info(&con, &s, &info); 
     74 
     75 if ( info.block_size > BUFSIZE ) 
     76  info.block_size = BUFSIZE; 
     77 
     78 while((i = read(0, buf, info.block_size))) 
    7179  if (roar_stream_add_data(&con, &s, buf, i) == -1) 
    7280   break; 
Note: See TracChangeset for help on using the changeset viewer.