Changeset 2599:9ec38681332f in roaraudio
- Timestamp:
- 09/11/09 03:09:05 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/codecfilter_wave.c
r2595 r2599 60 60 int r = -1; 61 61 char tbuf[44]; 62 struct roar_stream * s = ROAR_STREAM(self->stream); 62 struct roar_stream * ps = ROAR_STREAM(self->stream); 63 struct roar_stream * s; 64 struct roar_audio_info info; 63 65 uint16_t tmp16; 64 66 uint32_t tmp32; 65 67 int codec = -1; 68 int vid, fh; 66 69 67 70 if ( self->opened ) { … … 73 76 74 77 // TODO: write better code here! 78 79 if ( (fh = streams_get_fh(ps->id)) == -1 ) { 80 return -1; 81 } 82 83 if ( (vid = streams_new_virtual(ps->id, &(self->vstream))) == -1 ) { 84 return -1; 85 } 86 87 ROAR_DBG("cf_wave_read(*): self->vstream=%p", self->vstream); 88 89 s = ROAR_STREAM(self->vstream); 75 90 76 91 memcpy(&tmp32, tbuf+24, 4); … … 104 119 } 105 120 106 s->info.codec = codec; 121 s->info.codec = codec; 122 self->vstream->codec_orgi = codec; 123 124 memcpy(&info, &(s->info), sizeof(struct roar_audio_info)); 125 126 if ( streams_set_fh(vid, fh) == -1 ) { 127 return -1; 128 } 129 130 /* 131 if ( roar_vio_open_pass(&(self->vstream->vio), &(self->stream->vio)) == -1 ) { 132 return -1; 133 } 134 */ 135 136 memcpy(&(self->vstream->vio), &(self->stream->vio), sizeof(struct roar_vio_calls)); 137 138 if ( streams_set_fh(ps->id, -1) == -1 ) { 139 return -1; 140 } 141 142 memcpy(&(ps->info), &info, sizeof(struct roar_audio_info)); 107 143 108 144 self->opened = 1;
Note: See TracChangeset
for help on using the changeset viewer.