oga's tools
Revision | 6e3dccfcb80ef7dbd40234e8f5e4a8d1585a204e (tree) |
---|---|
Zeit | 2021-05-04 00:12:55 |
Autor | oga <hyperoga@gmai...> |
Commiter | oga |
21/05/03 V0.31 fix LIST chunk bug
@@ -14,6 +14,7 @@ | ||
14 | 14 | * 11/01/29 V0.28 fix display bug |
15 | 15 | * 12/03/19 V0.29 fix -ex degrade (調査中 ex. -ex 00:05-21:50) |
16 | 16 | * 21/05/02 V0.30 support -cs cut silent part |
17 | + * 21/05/03 V0.31 fix LIST chunk bug | |
17 | 18 | * |
18 | 19 | * |
19 | 20 | * お勧め: wavcut -s -lv 20 -ln 15 |
@@ -49,7 +50,7 @@ | ||
49 | 50 | #define strncasecmp strnicmp |
50 | 51 | #endif /* _WIN32 */ |
51 | 52 | |
52 | -#define VER "0.30" | |
53 | +#define VER "0.31" | |
53 | 54 | #define dprintf if (vf) printf |
54 | 55 | #define dprintf2 if (vf >= 2) printf |
55 | 56 | #define sgn(x) (x==0)?0:((x>0)?1:-1) |
@@ -274,6 +275,7 @@ int ReadWavData(FILE *fp) | ||
274 | 275 | /* |
275 | 276 | * Write wav headers |
276 | 277 | * |
278 | + * note: not write fact,LIST chunk | |
277 | 279 | */ |
278 | 280 | int WriteWavHeaders(FILE *wfp, |
279 | 281 | struct riff_hdr *rhdr, |
@@ -289,8 +291,8 @@ int WriteWavHeaders(FILE *wfp, | ||
289 | 291 | fwrite(rhdr, sizeof(struct riff_hdr), 1, wfp); |
290 | 292 | |
291 | 293 | for (i = 0; i<cnkcnt; i++) { |
292 | - if (strncmp(cnkhdr[i].id, "fact", 4)) { | |
293 | - /* excpt fact chunk (fmt, data...) */ | |
294 | + if (strncmp(cnkhdr[i].id, "fact", 4) && strncmp(cnkhdr[i].id, "LIST", 4)) { /* V0.31-C */ | |
295 | + /* write excpt fact,LIST chunk (fmt, data...) */ | |
294 | 296 | fwrite(&cnkhdr[i], sizeof(struct chunk_hdr), 1, wfp); /* chunk header */ |
295 | 297 | if (!strncmp(cnkhdr[i].id, "fmt ", 4)) { |
296 | 298 | fwrite(cnkfmt, cnkhdr[i].len, 1, wfp); /* fmt body */ |
@@ -1374,7 +1376,7 @@ void usage() | ||
1374 | 1376 | printf("wavcut Ver %s\n", VER); |
1375 | 1377 | printf("usage: wavcut [-d]\n"); |
1376 | 1378 | printf(" { [{-s|-cs}] [-lv <cut_level(%d)>] [-ln <blank_len>(%d)>]\n", th_val, bl_sec); |
1377 | - printf(" | -ex mm:ss-mm:ss[,mm:ss-ss,...]\n"); | |
1379 | + printf(" | -ex mm:ss-mm:ss[,mm:ss-mm:ss,...]\n"); | |
1378 | 1380 | printf(" | {-no | -vol <%%>}\n"); |
1379 | 1381 | printf(" | -rv }\n"); |
1380 | 1382 | printf(" [<wav_file>]\n"); |