Changeset 5535:051e141134da in roaraudio for libroar
- Timestamp:
- 06/12/12 15:24:46 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/stream.c
r5463 r5535 86 86 } 87 87 88 if ( bits > ROAR_BITS_MAX ) { 89 roar_err_set(ROAR_ERROR_RANGE); 90 return -1; 91 } 92 88 93 s->fh = -1; 89 94 s->id = -1; … … 93 98 s->dir = ROAR_DIR_DEFAULT; 94 99 95 /*96 s->datalen = 0;97 s->offset = 0;98 99 s->database = NULL;100 s->dataoff = NULL;101 */102 103 100 s->info.rate = rate; 104 101 s->info.channels = channels; … … 106 103 s->info.codec = codec; 107 104 108 if ( bits > ROAR_BITS_MAX ) 109 return -1; 105 return 0; 106 } 107 108 int roar_stream_new_by_info (struct roar_stream * s, const struct roar_audio_info * info) { 109 if ( s == NULL ) { 110 roar_err_set(ROAR_ERROR_FAULT); 111 return -1; 112 } 113 114 if ( info->bits > ROAR_BITS_MAX ) { 115 roar_err_set(ROAR_ERROR_RANGE); 116 return -1; 117 } 118 119 s->fh = -1; 120 s->id = -1; 121 s->pos = 0; 122 s->pos_rel_id = -1; 123 124 s->dir = ROAR_DIR_DEFAULT; 125 126 s->info = *info; 110 127 111 128 return 0;
Note: See TracChangeset
for help on using the changeset viewer.