• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

oga's tools


Commit MetaInfo

Revision6e3dccfcb80ef7dbd40234e8f5e4a8d1585a204e (tree)
Zeit2021-05-04 00:12:55
Autoroga <hyperoga@gmai...>
Commiteroga

Log Message

21/05/03 V0.31 fix LIST chunk bug

Ändern Zusammenfassung

Diff

--- a/wavcut.c
+++ b/wavcut.c
@@ -14,6 +14,7 @@
1414 * 11/01/29 V0.28 fix display bug
1515 * 12/03/19 V0.29 fix -ex degrade (調査中 ex. -ex 00:05-21:50)
1616 * 21/05/02 V0.30 support -cs cut silent part
17+ * 21/05/03 V0.31 fix LIST chunk bug
1718 *
1819 *
1920 * お勧め: wavcut -s -lv 20 -ln 15
@@ -49,7 +50,7 @@
4950 #define strncasecmp strnicmp
5051 #endif /* _WIN32 */
5152
52-#define VER "0.30"
53+#define VER "0.31"
5354 #define dprintf if (vf) printf
5455 #define dprintf2 if (vf >= 2) printf
5556 #define sgn(x) (x==0)?0:((x>0)?1:-1)
@@ -274,6 +275,7 @@ int ReadWavData(FILE *fp)
274275 /*
275276 * Write wav headers
276277 *
278+ * note: not write fact,LIST chunk
277279 */
278280 int WriteWavHeaders(FILE *wfp,
279281 struct riff_hdr *rhdr,
@@ -289,8 +291,8 @@ int WriteWavHeaders(FILE *wfp,
289291 fwrite(rhdr, sizeof(struct riff_hdr), 1, wfp);
290292
291293 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...) */
294296 fwrite(&cnkhdr[i], sizeof(struct chunk_hdr), 1, wfp); /* chunk header */
295297 if (!strncmp(cnkhdr[i].id, "fmt ", 4)) {
296298 fwrite(cnkfmt, cnkhdr[i].len, 1, wfp); /* fmt body */
@@ -1374,7 +1376,7 @@ void usage()
13741376 printf("wavcut Ver %s\n", VER);
13751377 printf("usage: wavcut [-d]\n");
13761378 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");
13781380 printf(" | {-no | -vol <%%>}\n");
13791381 printf(" | -rv }\n");
13801382 printf(" [<wav_file>]\n");