#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",
+ "audio/x-ms-wma",
NULL
};
{"recursive", no_argument, NULL, 'r'},
{"stdin", no_argument, NULL, 's'},
{"windows", no_argument, NULL, 'w'},
- {"exclude", required_argument, NULL, 'x'}
+ {"exclude", required_argument, NULL, 'x'},
+ {NULL, 0, NULL, 0}
};
int c;
int option_index = 0;
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;
}
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;
}
encoding = OGGENC;
}
if(strcmp(".wav", ext) == 0) {
- duration = -1; /* parse_wav(newpath); */
+ duration = -1;
+ /* parse_wav(newpath); */
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