Changeset 608:745a06132506 in roaraudio for roard/codecfilter_celt.c
- Timestamp:
- 08/19/08 21:01:30 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/codecfilter_celt.c
r361 r608 115 115 int cf_celt_read(CODECFILTER_USERDATA_T inst, char * buf, int len) { 116 116 struct codecfilter_celt_inst * self = (struct codecfilter_celt_inst *) inst; 117 int fh = ((struct roar_stream *)self->stream)->fh;118 117 int r = 0; 119 118 uint16_t fs; … … 129 128 130 129 while ( r <= (len - self->s_buf) ) { 131 if ( read(fh, &fs, 2) != 2 )130 if ( stream_vio_s_read(self->stream, &fs, 2) != 2 ) 132 131 break; 133 132 134 133 fs = ROAR_NET2HOST16(fs); 135 134 136 if ( read(fh, self->ibuf, fs) != fs )135 if ( stream_vio_s_read(self->stream, self->ibuf, fs) != fs ) 137 136 break; 138 137 … … 148 147 if ( r < len ) { 149 148 // printf("r < len!\n"); 150 if ( read(fh, &fs, 2) == 2 ) {149 if ( stream_vio_s_read(self->stream, &fs, 2) == 2 ) { 151 150 fs = ROAR_NET2HOST16(fs); 152 151 // 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 ) { 154 153 // printf("got data!\n"); 155 154 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.