projects
/
FAPG
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
version 0.41
[FAPG]
/
fapg.c
diff --git
a/fapg.c
b/fapg.c
index
df022cf
..
176c495
100644
(file)
--- a/
fapg.c
+++ b/
fapg.c
@@
-85,11
+85,13
@@
int duration;
#define MPPENC 4
#define OGGENC 5
#define WAVENC 6
#define MPPENC 4
#define OGGENC 5
#define WAVENC 6
+#define WMAENC 7
char *magic[] = { NULL,
"audio/mpeg", "audio/mpeg",
"audio/mpeg", "audio/mpeg",
"audio/ogg-vorbis", "audio/x-wav",
char *magic[] = { NULL,
"audio/mpeg", "audio/mpeg",
"audio/mpeg", "audio/mpeg",
"audio/ogg-vorbis", "audio/x-wav",
+ "audio/x-ms-wma",
NULL
};
NULL
};
@@
-841,7
+843,7
@@
void parse_ogg(unsigned char *file)
lus = fread(buffer, 1, OGG_BASE, fic);
/* try Ogg */
lus = fread(buffer, 1, OGG_BASE, fic);
/* try Ogg */
- if(
buffer[0] != 'O' && buffer[1] != 'g' && buffer[2] != 'g'
) {
+ if(
strncmp(buffer, "Ogg", 3) != 0
) {
fprintf(stderr, "Warning >> not a Ogg header : %s\n", file);
return;
}
fprintf(stderr, "Warning >> not a Ogg header : %s\n", file);
return;
}
@@
-924,7
+926,7
@@
void parse_mpc(unsigned char *file)
lus = fread(buffer, 1, 12, fic);
/* try Musepack */
lus = fread(buffer, 1, 12, fic);
/* try Musepack */
- if
(buffer[0] != 'M' && buffer[1] != 'P' && buffer[2] != '+'
) {
+ if
(strncmp(buffer, "MP+", 3) != 0
) {
fprintf(stderr, "Warning >> not a Musepack header : %s\n", file);
return;
}
fprintf(stderr, "Warning >> not a Musepack header : %s\n", file);
return;
}
@@
-1281,9
+1283,15
@@
void parse_file(unsigned char *newpath, unsigned char * original_path)
encoding = OGGENC;
}
if(strcmp(".wav", ext) == 0) {
encoding = OGGENC;
}
if(strcmp(".wav", ext) == 0) {
- duration = -1; /* parse_wav(newpath); */
+ duration = -1;
+ /* parse_wav(newpath); */
encoding = WAVENC;
}
encoding = WAVENC;
}
+ if(strcmp(".wma", ext) == 0) {
+ duration = -1;
+ /* parse_wma(newpath); */
+ encoding = WMAENC;
+ }
/* guesstitle() */
if((strlen(artist) == 0) && (strlen(title) == 0)) {
// there are no tag infos read
/* guesstitle() */
if((strlen(artist) == 0) && (strlen(title) == 0)) {
// there are no tag infos read