Changeset 1000:43afe5f9b605 in roaraudio
- Timestamp:
- 12/19/08 00:17:51 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/file.c
r889 r1000 44 44 if ( strncmp(buf, "OggS", 4) == 0 ) { 45 45 codec = ROAR_CODEC_OGG_GENERAL; 46 if ( len > 34 ) { // this is 7 bytes after the end of the header 47 if ( strncmp(buf+28, "\001vorbis", 7) == 0 ) 48 codec = ROAR_CODEC_OGG_VORBIS; 46 if ( len > 32 ) { // this is 5 bytes after the end of the header 47 if ( strncmp(buf+28, "\177FLAC", 5) == 0 ) { 48 codec = ROAR_CODEC_OGG_FLAC; 49 } else if ( strncmp(buf+28, "Speex", 5) == 0 ) { 50 codec = ROAR_CODEC_OGG_SPEEX; 51 } else if ( len > 34 ) { // this is 7 bytes after the end of the header 52 if ( strncmp(buf+28, "\001vorbis", 7) == 0 ) 53 codec = ROAR_CODEC_OGG_VORBIS; 54 } 49 55 } 50 56 } else if ( strncmp(buf, "MThd", 4) == 0 ) { … … 195 201 codec = roar_file_codecdetect(buf, len); 196 202 203 ROAR_DBG("roar_file_play_full(*): codec=%i(%s)", codec, roar_codec2str(codec)); 204 197 205 seek = lseek(in, 0, SEEK_SET) == (off_t) -1 ? 0 : 1; 198 206
Note: See TracChangeset
for help on using the changeset viewer.