shithub: sox

Download patch

ref: e85a7b00a1e08acb2669d14bcc4559cfbf352e7c
parent: f261dd3a92387f085c0651d60084a2ea81d80cba
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Thu Aug 17 00:14:08 EDT 2023

add formats

--- a/src/mkfile
+++ b/src/mkfile
@@ -8,6 +8,7 @@
 	sox_i.h xmalloc.h util.h soxomp.h band.h biquad.h compandt.h \
 	dft_filter.h dither.h effects.h fft4g.h fifo.h mcompand_xover.h \
 	noisered.h rate_filters.h rate_half_fir.h rate_poly_fir0.h rate_poly_fir.h \
+	id3.h \
 
 OFILES=\
 	adpcms.$O aiff.$O cvsd.$O \
@@ -24,6 +25,13 @@
 	remix.$O repeat.$O reverb.$O reverse.$O silence.$O sinc.$O skeleff.$O \
 	speed.$O splice.$O stat.$O stats.$O stretch.$O swap.$O \
 	synth.$O tempo.$O tremolo.$O trim.$O upsample.$O vad.$O vol.$O \
+	raw-fmt.$O s1-fmt.$O s2-fmt.$O s3-fmt.$O \
+	s4-fmt.$O u1-fmt.$O u2-fmt.$O u3-fmt.$O u4-fmt.$O al-fmt.$O la-fmt.$O ul-fmt.$O \
+	lu-fmt.$O 8svx.$O aiff-fmt.$O aifc-fmt.$O au.$O avr.$O cdr.$O cvsd-fmt.$O \
+	dvms-fmt.$O dat.$O hcom.$O htk.$O maud.$O prc.$O sf.$O smp.$O \
+	sounder.$O soundtool.$O sphere.$O tx16w.$O voc.$O vox-fmt.$O ima-fmt.$O adpcm.$O \
+	ima_rw.$O wav.$O wve.$O xa.$O nulfile.$O f4-fmt.$O f8-fmt.$O gsrt.$O \
+	id3.$O \
 
 UPDATE=\
 	mkfile\
--- a/src/prc.c
+++ b/src/prc.c
@@ -68,7 +68,7 @@
 
 static void prcwriteheader(sox_format_t * ft);
 
-static int seek(sox_format_t * ft, uint64_t offset)
+static int soxseek(sox_format_t * ft, uint64_t offset)
 {
   priv_t * p = (priv_t *)ft->priv;
   if (ft->encoding.encoding == SOX_ENCODING_ALAW)
@@ -443,7 +443,7 @@
     names, SOX_FILE_LIT_END | SOX_FILE_MONO,
     startread, read_samples, stopread,
     startwrite, write_samples, stopwrite,
-    seek, write_encodings, write_rates, sizeof(priv_t)
+    soxseek, write_encodings, write_rates, sizeof(priv_t)
   };
   return &handler;
 }
--- a/src/wav.c
+++ b/src/wav.c
@@ -603,7 +603,7 @@
     { WAVE_FORMAT_OLIADPCM,             "Olivetti ADPCM" },
     { WAVE_FORMAT_OLISBC,               "Olivetti CELP" },
     { WAVE_FORMAT_OLIOPR,               "Olivetti OPR" },
-    { }
+    { NULL }
 };
 
 static const struct wave_format *wav_find_format(unsigned tag)
@@ -1588,7 +1588,7 @@
     return f ? f->name : "unknown";
 }
 
-static int seek(sox_format_t * ft, uint64_t offset)
+static int soxseek(sox_format_t * ft, uint64_t offset)
 {
   priv_t *   wav = (priv_t *) ft->priv;
 
@@ -1644,7 +1644,7 @@
     "Microsoft audio format", names, SOX_FILE_LIT_END,
     startread, read_samples, stopread,
     startwrite, write_samples, stopwrite,
-    seek, write_encodings, NULL, sizeof(priv_t)
+    soxseek, write_encodings, NULL, sizeof(priv_t)
   };
   return &handler;
 }