• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得windowscocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

oga's tools


Commit MetaInfo

Revision0da93104107009b029c71f744b472de51d1bcf6a (tree)
Zeit2021-05-09 06:29:12
Autorhyperoga <hyperoga@gmai...>
Commiterhyperoga

Log Message

21/05/08 V0.32 support 64bit Linux

Ändern Zusammenfassung

Diff

--- a/wavcut.c
+++ b/wavcut.c
@@ -15,6 +15,7 @@
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
1717 * 21/05/03 V0.31 fix LIST chunk bug
18+ * 21/05/08 V0.32 support 64bit Linux
1819 *
1920 *
2021 * お勧め: wavcut -s -lv 20 -ln 15
@@ -50,7 +51,7 @@
5051 #define strncasecmp strnicmp
5152 #endif /* _WIN32 */
5253
53-#define VER "0.31"
54+#define VER "0.32"
5455 #define dprintf if (vf) printf
5556 #define dprintf2 if (vf >= 2) printf
5657 #define sgn(x) (x==0)?0:((x>0)?1:-1)
@@ -71,7 +72,8 @@ int mf = 0; /* -m merge wavfiles V0.27-A */
7172 int csf = 0; /* -cs cut silent part V0.30-A */
7273 int peak_level = 0; /* peak level for -no */
7374 int max_level = 0; /* max level for -no */
74-long pre_datlen = 0; /* heders total length to wav data */
75+/* long pre_datlen = 0; heders total length to wav data */
76+int pre_datlen = 0; /* heders total length to wav data V0.32-C */
7577
7678 int gBytePerSample = 0; /* Byte / Sample */
7779 int gChannels = 0; /* Num of Channel */
@@ -81,13 +83,13 @@ int gUnit = 0; /* Byte / Sample * nChannel */
8183 /* data formats */
8284 struct riff_hdr {
8385 char id[4]; /* RIFF id ("RIFF") */
84- unsigned long len; /* length */
86+ unsigned int len; /* length V0.32-C */
8587 char wave_id[4]; /* data type ("WAVE") */
8688 };
8789
8890 struct chunk_hdr {
8991 char id[4]; /* chunk id ("fmt "|"data"...) */
90- unsigned long len; /* chunk length */
92+ unsigned int len; /* chunk length V0.32-C */
9193 };
9294
9395 /* chunk type fmt 1 */
@@ -105,8 +107,8 @@ struct ck_fmt {
105107 #define IBM_FORMAT_ALAW 0x0102 /* IBM a-law format */
106108 #define IBM_FORMAT_ADPCM 0x0103 /* IBM AVC Adaptive Diff PCM format */
107109 unsigned short wChannels; /* Number of channels */
108- unsigned long dwSamplesPerSec; /* Sampling rate */
109- unsigned long dwAvgBytesPerSec; /* For buffer estimation */
110+ unsigned int dwSamplesPerSec; /* Sampling rate V0.32-C */
111+ unsigned int dwAvgBytesPerSec; /* For buffer estimation V0.32-C */
110112 unsigned short wBlockAlign; /* Data block size */
111113 unsigned short wBitsPerSample; /* Sample size (for WAVE_FORMAT_PCM */
112114 unsigned short unknown; /* Unknown data */
@@ -451,7 +453,7 @@ int WavAnalyze(FILE *fp)
451453 if (sf || csf || (ntment && outf)) { /* V0.30-A */
452454 /* ### Open Output File */
453455 sprintf(fname, "%s_%03d.wav", in_fname, file_cnt++);
454- printf("## Writing %s ...\n", fname);
456+ printf("## Writing1 %s ...\n", fname);
455457 wfp = fopen(fname, "wb");
456458 if (wfp == NULL) {
457459 perror(fname);
@@ -567,7 +569,7 @@ int WavAnalyze(FILE *fp)
567569 }
568570 if (sf) {
569571 sprintf(fname, "%s_%03d.wav", in_fname, file_cnt++);
570- printf("## Writing %s ...\n", fname);
572+ printf("## Writing2 %s ...\n", fname);
571573 /* ### Open Next Wav File */
572574 wfp = fopen(fname, "wb");
573575 if (wfp == NULL) {
@@ -622,7 +624,7 @@ int WavAnalyze(FILE *fp)
622624 if (wfp == NULL) {
623625 data_size = 0; /* reset data chunk size */
624626 sprintf(fname, "%s_%03d.wav", in_fname, file_cnt++);
625- printf("## Writing %s ...\n", fname);
627+ printf("## Writing3 %s ...\n", fname);
626628 /* ### Open Wav File */
627629 wfp = fopen(fname, "wb");
628630 if (wfp == NULL) {
@@ -1015,7 +1017,7 @@ void MergeWavs(char **files)
10151017 if (sf || (ntment && outf)) {
10161018 /* ### Open Output File */
10171019 sprintf(fname, "%s_%03d.wav", in_fname, file_cnt++);
1018- printf("## Writing %s ...\n", fname);
1020+ printf("## Writing4 %s ...\n", fname);
10191021 wfp = fopen(fname, "wb");
10201022 if (wfp == NULL) {
10211023 perror(fname);
@@ -1125,7 +1127,7 @@ void MergeWavs(char **files)
11251127 data_size = 0; /* reset data chunk size */
11261128 if (sf) {
11271129 sprintf(fname, "%s_%03d.wav", in_fname, file_cnt++);
1128- printf("## Writing %s ...\n", fname);
1130+ printf("## Writing5 %s ...\n", fname);
11291131 /* ### Open Next Wav File */
11301132 wfp = fopen(fname, "wb");
11311133 if (wfp == NULL) {
@@ -1180,7 +1182,7 @@ void MergeWavs(char **files)
11801182 if (wfp == NULL) {
11811183 data_size = 0; /* reset data chunk size */
11821184 sprintf(fname, "%s_%03d.wav", in_fname, file_cnt++);
1183- printf("## Writing %s ...\n", fname);
1185+ printf("## Writing6 %s ...\n", fname);
11841186 /* ### Open Wav File */
11851187 wfp = fopen(fname, "wb");
11861188 if (wfp == NULL) {
@@ -1411,7 +1413,7 @@ int main(int a, char *b[])
14111413 ++vf;
14121414 continue;
14131415 }
1414- if (!strncmp(b[i],"-d",2)) {
1416+ if (!strcmp(b[i],"-d")) {
14151417 df = 1; /* Display Wav Data */
14161418 continue;
14171419 }
@@ -1419,7 +1421,7 @@ int main(int a, char *b[])
14191421 rvf = 1; /* Reduce Voice */
14201422 continue;
14211423 }
1422- if (!strncmp(b[i],"-s",2)) {
1424+ if (!strcmp(b[i],"-s")) {
14231425 if (ntment || csf) { /* V0.30-C */
14241426 usage();
14251427 }
@@ -1428,7 +1430,7 @@ int main(int a, char *b[])
14281430 }
14291431
14301432 /* V0.30-A start */
1431- if (!strncmp(b[i],"-cs",2)) {
1433+ if (!strcmp(b[i],"-cs")) {
14321434 if (ntment || sf) {
14331435 usage();
14341436 }