Changeset 608:745a06132506 in roaraudio
- Timestamp:
- 08/19/08 21:01:30 (16 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- roard
- Files:
-
- 2 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 ) { -
roard/codecfilter_speex.c
r397 r608 67 67 int cf_speex_read(CODECFILTER_USERDATA_T inst, char * buf, int len) { 68 68 struct codecfilter_speex_inst * self = (struct codecfilter_speex_inst *) inst; 69 struct roar_stream * s = (struct roar_stream *) self->stream;70 69 int mode; 71 70 uint16_t ui; … … 78 77 if ( ! self->decoder ) { 79 78 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 ) 81 80 return 0; 82 81 … … 137 136 while (still_todo) { 138 137 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 ) 140 139 return -1; 141 140 … … 145 144 return 0; 146 145 147 if ( read(s->fh, self->cc, ui) != ui )146 if ( stream_vio_s_read(self->stream, self->cc, ui) != ui ) 148 147 break; 149 148
Note: See TracChangeset
for help on using the changeset viewer.