Changeset 608:745a06132506 in roaraudio


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

make codec filter fuse vio

Location:
roard
Files:
2 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 ) { 
  • roard/codecfilter_speex.c

    r397 r608  
    6767int cf_speex_read(CODECFILTER_USERDATA_T   inst, char * buf, int len) { 
    6868 struct codecfilter_speex_inst * self = (struct codecfilter_speex_inst *) inst; 
    69  struct roar_stream * s = (struct roar_stream *) self->stream; 
    7069 int mode; 
    7170 uint16_t ui; 
     
    7877 if ( ! self->decoder ) { 
    7978  ROAR_DBG("cf_speex_read(*): no decoder, starting one!"); 
    80   if ( read(s->fh, &ui, 2) != 2 ) 
     79  if ( stream_vio_s_read(self->stream, &ui, 2) != 2 ) 
    8180   return 0; 
    8281 
     
    137136 while (still_todo) { 
    138137  ROAR_WARN("cf_speex_read(*): we sill need %i frames", still_todo); 
    139   if ( read(s->fh, &ui, 2) != 2 ) 
     138  if ( stream_vio_s_read(self->stream, &ui, 2) != 2 ) 
    140139   return -1; 
    141140 
     
    145144   return 0; 
    146145 
    147   if ( read(s->fh, self->cc, ui) != ui ) 
     146  if ( stream_vio_s_read(self->stream, self->cc, ui) != ui ) 
    148147   break; 
    149148 
Note: See TracChangeset for help on using the changeset viewer.