Here is a quick and dirty patch to add SOWT audio. It applies to git
as of 27 Jun 2010.
It adds sowt.c and sowt.h, slightly modified from twos.c and twos.h,
changes a few
other files to include the new codec, and changes all Makefiles I could find to
hopefully include these changes no matter how it is built. It could be
more efficient,
and maybe some of the Makefiles are actually overwritten, but it works for me.
Mark
Common subdirectories: my_cinelerra/quicktime/docs and my_cinelerra_sowt/quicktime/docs
Common subdirectories: my_cinelerra/quicktime/encore50 and my_cinelerra_sowt/quicktime/encore50
Common subdirectories: my_cinelerra/quicktime/ffmpeg and my_cinelerra_sowt/quicktime/ffmpeg
diff -Nau my_cinelerra/quicktime/Makefile.2 my_cinelerra_sowt/quicktime/Makefile.2
--- my_cinelerra/quicktime/Makefile.2 2010-06-28 00:47:50.0 -0700
+++ my_cinelerra_sowt/quicktime/Makefile.2 2010-06-28 00:38:08.0 -0700
@@ -115,6 +115,7 @@
$(OBJDIR)/tkhd.o \
$(OBJDIR)/trak.o \
$(OBJDIR)/twos.o \
+ $(OBJDIR)/sowt.o \
$(OBJDIR)/udta.o \
$(OBJDIR)/ulaw.o \
$(OBJDIR)/util.o \
@@ -377,6 +378,7 @@
$(OBJDIR)/tkhd.o: tkhd.c
$(OBJDIR)/trak.o: trak.c
$(OBJDIR)/twos.o: twos.c
+$(OBJDIR)/sowt.o: sowt.c
$(OBJDIR)/udta.o: udta.c
$(OBJDIR)/ulaw.o: ulaw.c
$(OBJDIR)/util.o: util.c
diff -Nau my_cinelerra/quicktime/Makefile.50 my_cinelerra_sowt/quicktime/Makefile.50
--- my_cinelerra/quicktime/Makefile.50 2010-06-28 00:47:50.0 -0700
+++ my_cinelerra_sowt/quicktime/Makefile.50 2010-06-28 00:39:29.0 -0700
@@ -131,6 +131,7 @@
$(OBJDIR)/tkhd.o \
$(OBJDIR)/trak.o \
$(OBJDIR)/twos.o \
+ $(OBJDIR)/sowt.o \
$(OBJDIR)/udta.o \
$(OBJDIR)/ulaw.o \
$(OBJDIR)/util.o \
@@ -360,6 +361,7 @@
$(OBJDIR)/tkhd.o: tkhd.c
$(OBJDIR)/trak.o: trak.c
$(OBJDIR)/twos.o: twos.c
+$(OBJDIR)/sowt.o: sowt.c
$(OBJDIR)/udta.o: udta.c
$(OBJDIR)/ulaw.o: ulaw.c
$(OBJDIR)/util.o: util.c
diff -Nau my_cinelerra/quicktime/Makefile.am my_cinelerra_sowt/quicktime/Makefile.am
--- my_cinelerra/quicktime/Makefile.am 2010-06-28 00:47:50.0 -0700
+++ my_cinelerra_sowt/quicktime/Makefile.am 2010-06-28 00:40:42.0 -0700
@@ -66,7 +66,7 @@
rawaudio.c \
rle.c \
smhd.c stbl.c stco.c stsc.c stsd.c stsdtable.c stss.c stsz.c stts.c \
- tkhd.c trak.c twos.c udta.c ulaw.c util.c v308.c v408.c v410.c vmhd.c \
+ tkhd.c trak.c twos.c sowt.c udta.c ulaw.c util.c v308.c v408.c v410.c vmhd.c \
vbraudio.c \
vorbis.c workarounds.c yuv2.c yuv4.c yv12.c wmx2.c \
wma.c mpeg4.c
@@ -103,6 +103,7 @@
rtjpeg.h \
rtjpeg_core.h \
twos.h \
+ sowt.h \
ulaw.h \
v308.h \
v408.h \
diff -Nau my_cinelerra/quicktime/Makefile.encore2 my_cinelerra_sowt/quicktime/Makefile.encore2
--- my_cinelerra/quicktime/Makefile.encore2 2010-06-28 00:47:50.0 -0700
+++ my_cinelerra_sowt/quicktime/Makefile.encore2 2010-06-28 00:42:00.0 -0700
@@ -150,6 +150,7 @@
$(OBJDIR)/tkhd.o \
$(OBJDIR)/trak.o \
$(OBJDIR)/twos.o \
+ $(OBJDIR)/sowt.o \
$(OBJDIR)/udta.o \
$(OBJDIR)/ulaw.o \
$(OBJDIR)/util.o \
@@ -510,6 +511,7 @@
$(OBJDIR)/tkhd.o: tkhd.c
$(OBJDIR)/trak.o: trak.c
$(OBJDIR)/twos.o: twos.c
+$(OBJDIR)/sowt.o: sowt.c
$(OBJDIR)/udta.o: udta.c
$(OBJDIR)/ulaw.o: ulaw.c
$(OBJDIR)/util.o: util.c
diff -Nau my_cinelerra/quicktime/plugin.c my_cinelerra_sowt/quicktime/plugin.c
--- my_cinelerra/quicktime/plugin.c 2010-06-28 00:47:52.0 -0700
+++ my_cinelerra_sowt/quicktime/plugin.c 2010-06-28 00:43:24.0 -0700
@@ -41,6 +41,7 @@
#include qtmp3.h
#include rawaudio.h
#include twos.h
+#include sowt.h
#include ulaw.h
#include wma.h
#include wmx2.h
@@ -48,6 +49,7 @@
static void register_acodecs()
{
register_acodec(quicktime_init_codec_twos);
+ register_acodec(quicktime_init_codec_sowt);
register_acodec(quicktime_init_codec_rawaudio);
register_acodec(quicktime_init_codec_ima4);
register_acodec(quicktime_init_codec_mp4a);
diff -Nau my_cinelerra/quicktime/quicktime.h my_cinelerra_sowt/quicktime/quicktime.h
--- my_cinelerra/quicktime/quicktime.h 2010-06-28 00:47:52.0 -0700
+++ my_cinelerra_sowt/quicktime/quicktime.h 2010-06-28 00:44:40.0 -0700
@@ -115,6 +115,7 @@
/* Twos compliment 8, 16, 24 */
#define QUICKTIME_TWOS twos
+#define QUICKTIME_SOWT sowt
/* ulaw */
#define QUICKTIME_ULAW ulaw
diff -Nau my_cinelerra/quicktime/sowt.c my_cinelerra_sowt/quicktime/sowt.c
--- my_cinelerra/quicktime/sowt.c 1969-12-31 17:00:00.0 -0700
+++ my_cinelerra_sowt/quicktime/sowt.c 2010-06-28 00:35:39.0 -0700
@@ -0,0 +1,335 @@
+#include funcprotos.h
+#include quicktime.h
+#include sowt.h
+
+/* === private for sowt */
+
+
+typedef struct
+{
+ char *work_buffer;
+ long buffer_size;
+} quicktime_sowt_codec_t;
+
+static int byte_order(void)
+{/* 1 if little endian */
+ int16_t byteordertest;
+ int