Changeset 608:745a06132506 in roaraudio for roard/codecfilter_celt.c


Ignore:
Timestamp:
08/19/08 21:01:30 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

make codec filter fuse vio

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/codecfilter_celt.c

    r361 r608  
    115115int cf_celt_read(CODECFILTER_USERDATA_T   inst, char * buf, int len) { 
    116116 struct codecfilter_celt_inst * self = (struct codecfilter_celt_inst *) inst; 
    117  int fh = ((struct roar_stream *)self->stream)->fh; 
    118117 int r = 0; 
    119118 uint16_t fs; 
     
    129128 
    130129 while ( r <= (len - self->s_buf) ) { 
    131   if ( read(fh, &fs, 2) != 2 ) 
     130  if ( stream_vio_s_read(self->stream, &fs, 2) != 2 ) 
    132131   break; 
    133132 
    134133  fs = ROAR_NET2HOST16(fs); 
    135134 
    136   if ( read(fh, self->ibuf, fs) != fs ) 
     135  if ( stream_vio_s_read(self->stream, self->ibuf, fs) != fs ) 
    137136   break; 
    138137 
     
    148147 if ( r < len ) { 
    149148//  printf("r < len!\n"); 
    150   if ( read(fh, &fs, 2) == 2 ) { 
     149  if ( stream_vio_s_read(self->stream, &fs, 2) == 2 ) { 
    151150   fs = ROAR_NET2HOST16(fs); 
    152151//   printf("next: fs=%i\n", fs); 
    153    if ( read(fh, self->ibuf, fs) == fs ) { 
     152   if ( stream_vio_s_read(self->stream, self->ibuf, fs) == fs ) { 
    154153//    printf("got data!\n"); 
    155154    if ( celt_decode(self->decoder, (unsigned char *) self->ibuf, fs, (celt_int16_t *) self->obuf) >= 0 ) { 
Note: See TracChangeset for help on using the changeset viewer.