From d415912b591402550fc727bdc4fbd378e02a4ead Mon Sep 17 00:00:00 2001 From: adamw Date: Sun, 27 Jul 2014 13:35:15 +0000 Subject: Fix build and clean up, mostly by renaming patches. Interestingly, the build failure and one of the sed commands in the post-patch target were both due to problems introduced by one of the patches. --- audio/maplay/Makefile | 9 +-- audio/maplay/files/patch-Makefile | 47 ++++++++++++++ audio/maplay/files/patch-ab | 47 -------------- audio/maplay/files/patch-ad | 32 ---------- audio/maplay/files/patch-af | 61 ------------------ audio/maplay/files/patch-ah | 25 -------- audio/maplay/files/patch-ak | 21 ------- audio/maplay/files/patch-all.h | 19 ++++++ audio/maplay/files/patch-am | 65 ------------------- audio/maplay/files/patch-an | 97 ----------------------------- audio/maplay/files/patch-ao | 82 ------------------------ audio/maplay/files/patch-ap | 19 ------ audio/maplay/files/patch-configuration.sh | 32 ++++++++++ audio/maplay/files/patch-header.h | 61 ++++++++++++++++++ audio/maplay/files/patch-ibitstream.h | 25 ++++++++ audio/maplay/files/patch-maplay.cc | 12 ++-- audio/maplay/files/patch-subband.h | 21 +++++++ audio/maplay/files/patch-subband_layer_1.h | 65 +++++++++++++++++++ audio/maplay/files/patch-subband_layer_2.cc | 97 +++++++++++++++++++++++++++++ audio/maplay/files/patch-subband_layer_2.h | 82 ++++++++++++++++++++++++ 20 files changed, 459 insertions(+), 460 deletions(-) create mode 100644 audio/maplay/files/patch-Makefile delete mode 100644 audio/maplay/files/patch-ab delete mode 100644 audio/maplay/files/patch-ad delete mode 100644 audio/maplay/files/patch-af delete mode 100644 audio/maplay/files/patch-ah delete mode 100644 audio/maplay/files/patch-ak create mode 100644 audio/maplay/files/patch-all.h delete mode 100644 audio/maplay/files/patch-am delete mode 100644 audio/maplay/files/patch-an delete mode 100644 audio/maplay/files/patch-ao delete mode 100644 audio/maplay/files/patch-ap create mode 100644 audio/maplay/files/patch-configuration.sh create mode 100644 audio/maplay/files/patch-header.h create mode 100644 audio/maplay/files/patch-ibitstream.h create mode 100644 audio/maplay/files/patch-subband.h create mode 100644 audio/maplay/files/patch-subband_layer_1.h create mode 100644 audio/maplay/files/patch-subband_layer_2.cc create mode 100644 audio/maplay/files/patch-subband_layer_2.h diff --git a/audio/maplay/Makefile b/audio/maplay/Makefile index 754626d3815f..6382b44aac98 100644 --- a/audio/maplay/Makefile +++ b/audio/maplay/Makefile @@ -6,7 +6,6 @@ PORTVERSION= 1.2 CATEGORIES= audio MASTER_SITES= ftp://ftp.tnt.uni-hannover.de/pub/MPEG/audio/other-servers/Maplay-Mirror/ DISTNAME= ${PORTNAME}${PORTVERSION:S/./_/} -EXTRACT_SUFX= .tar.Z MAINTAINER= ports@FreeBSD.org COMMENT= MPEG audio player/decoder decoding layer I and II MPEG audio streams @@ -14,20 +13,16 @@ COMMENT= MPEG audio player/decoder decoding layer I and II MPEG audio streams LICENSE= GPLv2 NO_WRKSUBDIR= yes +USES= tar:Z PLIST_FILES= bin/maplay PORTDOCS= README OPTIONS_DEFINE= DOCS -post-patch: - @${REINPLACE_CMD} -e 's,^main,int main,g' ${WRKSRC}/maplay.cc - @${REINPLACE_CMD} -e 's,machine/soundcard.h,sys/soundcard.h,' \ - ${WRKSRC}/configuration.sh - do-install: ${INSTALL_PROGRAM} ${WRKSRC}/maplay ${STAGEDIR}${PREFIX}/bin @${MKDIR} ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}/ + ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} .include diff --git a/audio/maplay/files/patch-Makefile b/audio/maplay/files/patch-Makefile new file mode 100644 index 000000000000..2b8bd0fe7c96 --- /dev/null +++ b/audio/maplay/files/patch-Makefile @@ -0,0 +1,47 @@ +*** Makefile.orig Thu Jun 23 21:14:46 1994 +--- Makefile Thu Dec 9 06:09:27 1999 +*************** +*** 27,33 **** + # + + +! CFLAGS = $(COMPILERFLAGS) + # debugging: -ggdb -DDEBUG + # profiling: -pg (gprof) or -p (prof) + # strip command has to be removed for debugging or profiling +--- 27,33 ---- + # + + +! CFLAGS += $(COMPILERFLAGS) + # debugging: -ggdb -DDEBUG + # profiling: -pg (gprof) or -p (prof) + # strip command has to be removed for debugging or profiling +*************** +*** 39,52 **** + + .SUFFIXES: .cc + +! install: + @./configuration.sh + +- all: maplay +- + maplay: $(OBJS) + $(COMPILER) $(CFLAGS) $(OBJS) -o $@ $(LIBRARIES) -lm +- -strip $@ + + .cc.o: + $(COMPILER) -c $(CFLAGS) $(INCLUDEDIRS) $*.cc -o $@ +--- 39,49 ---- + + .SUFFIXES: .cc + +! all: + @./configuration.sh + + maplay: $(OBJS) + $(COMPILER) $(CFLAGS) $(OBJS) -o $@ $(LIBRARIES) -lm + + .cc.o: + $(COMPILER) -c $(CFLAGS) $(INCLUDEDIRS) $*.cc -o $@ diff --git a/audio/maplay/files/patch-ab b/audio/maplay/files/patch-ab deleted file mode 100644 index 2b8bd0fe7c96..000000000000 --- a/audio/maplay/files/patch-ab +++ /dev/null @@ -1,47 +0,0 @@ -*** Makefile.orig Thu Jun 23 21:14:46 1994 ---- Makefile Thu Dec 9 06:09:27 1999 -*************** -*** 27,33 **** - # - - -! CFLAGS = $(COMPILERFLAGS) - # debugging: -ggdb -DDEBUG - # profiling: -pg (gprof) or -p (prof) - # strip command has to be removed for debugging or profiling ---- 27,33 ---- - # - - -! CFLAGS += $(COMPILERFLAGS) - # debugging: -ggdb -DDEBUG - # profiling: -pg (gprof) or -p (prof) - # strip command has to be removed for debugging or profiling -*************** -*** 39,52 **** - - .SUFFIXES: .cc - -! install: - @./configuration.sh - -- all: maplay -- - maplay: $(OBJS) - $(COMPILER) $(CFLAGS) $(OBJS) -o $@ $(LIBRARIES) -lm -- -strip $@ - - .cc.o: - $(COMPILER) -c $(CFLAGS) $(INCLUDEDIRS) $*.cc -o $@ ---- 39,49 ---- - - .SUFFIXES: .cc - -! all: - @./configuration.sh - - maplay: $(OBJS) - $(COMPILER) $(CFLAGS) $(OBJS) -o $@ $(LIBRARIES) -lm - - .cc.o: - $(COMPILER) -c $(CFLAGS) $(INCLUDEDIRS) $*.cc -o $@ diff --git a/audio/maplay/files/patch-ad b/audio/maplay/files/patch-ad deleted file mode 100644 index 3829d864a091..000000000000 --- a/audio/maplay/files/patch-ad +++ /dev/null @@ -1,32 +0,0 @@ -*** configuration.sh.orig Thu Jun 23 21:14:46 1994 ---- configuration.sh Thu Dec 9 05:21:02 1999 -*************** -*** 72,77 **** ---- 72,87 ---- - INCLUDEDIRS= - LIBRARIES= - AUDIO_INCLUDES='#include ' ;; -+ FreeBSD*) -+ COMPILER='${CXX}' -+ if [ ${ARCH} = "i386" ]; then -+ COMPILERFLAGS='-m486 -DLINUX -DDAMN_INTEL_BYTE_ORDER' -+ else -+ COMPILERFLAGS='-DLINUX' -+ fi -+ INCLUDEDIRS= -+ LIBRARIES= -+ AUDIO_INCLUDES='#include ' ;; - Linux*) - COMPILER=g++ - COMPILERFLAGS='-O2 -m486 -funroll-loops -DLINUX -DDAMN_INTEL_BYTE_ORDER' -*************** -*** 95,98 **** - echo $AUDIO_INCLUDES >audio_includes.h - fi - -! make all ---- 105,108 ---- - echo $AUDIO_INCLUDES >audio_includes.h - fi - -! make maplay diff --git a/audio/maplay/files/patch-af b/audio/maplay/files/patch-af deleted file mode 100644 index 342deecaf589..000000000000 --- a/audio/maplay/files/patch-af +++ /dev/null @@ -1,61 +0,0 @@ -*** header.h.orig Thu Jun 23 21:14:40 1994 ---- header.h Thu Dec 9 05:45:44 1999 -*************** -*** 39,45 **** - e_mode h_mode; - e_sample_frequency h_sample_frequency; - uint32 h_number_of_subbands, h_intensity_stereo_bound; -! bool h_copyright, h_original; - Crc16 *crc; - uint16 checksum; - ---- 39,45 ---- - e_mode h_mode; - e_sample_frequency h_sample_frequency; - uint32 h_number_of_subbands, h_intensity_stereo_bound; -! boolean h_copyright, h_original; - Crc16 *crc; - uint16 checksum; - -*************** -*** 48,54 **** - public: - Header (void) { crc = (Crc16 *)0; } - ~Header (void) { if (crc) delete crc; } -! bool read_header (Ibitstream *, Crc16 **); - // read a 32-bit header from the bitstream - - // functions to query header contents: ---- 48,54 ---- - public: - Header (void) { crc = (Crc16 *)0; } - ~Header (void) { if (crc) delete crc; } -! boolean read_header (Ibitstream *, Crc16 **); - // read a 32-bit header from the bitstream - - // functions to query header contents: -*************** -*** 58,68 **** - uint32 frequency (void) { return frequencies[h_sample_frequency]; } - static uint32 frequency (e_sample_frequency rate) { return frequencies[rate]; } - e_mode mode (void) { return h_mode; }; -! bool checksums (void) { return !h_protection_bit; } -! bool copyright (void) { return h_copyright; } -! bool original (void) { return h_original; } - -! bool checksum_ok (void) { return checksum == crc->checksum (); } - // compares computed checksum with stream checksum - - // functions which return header informations as strings: ---- 58,68 ---- - uint32 frequency (void) { return frequencies[h_sample_frequency]; } - static uint32 frequency (e_sample_frequency rate) { return frequencies[rate]; } - e_mode mode (void) { return h_mode; }; -! boolean checksums (void) { return !h_protection_bit; } -! boolean copyright (void) { return h_copyright; } -! boolean original (void) { return h_original; } - -! boolean checksum_ok (void) { return checksum == crc->checksum (); } - // compares computed checksum with stream checksum - - // functions which return header informations as strings: diff --git a/audio/maplay/files/patch-ah b/audio/maplay/files/patch-ah deleted file mode 100644 index fb92627bd6e6..000000000000 --- a/audio/maplay/files/patch-ah +++ /dev/null @@ -1,25 +0,0 @@ -*** ibitstream.h.orig Thu Jun 23 21:14:40 1994 ---- ibitstream.h Thu Dec 9 05:32:18 1999 -*************** -*** 43,52 **** - ~Ibitstream (void); - int filedescriptor (void) { return fd; }; - -! bool get_header (uint32 *); - // get next 32 bits from bitstream in an unsigned int, - // returned value False => end of stream -! bool read_frame (uint32 bytesize); - // fill buffer with data from bitstream, returned value False => end of stream - uint32 get_bits (uint32 number_of_bits); - // read bits (1 <= number_of_bits <= 16) from buffer into the lower bits ---- 43,52 ---- - ~Ibitstream (void); - int filedescriptor (void) { return fd; }; - -! boolean get_header (uint32 *); - // get next 32 bits from bitstream in an unsigned int, - // returned value False => end of stream -! boolean read_frame (uint32 bytesize); - // fill buffer with data from bitstream, returned value False => end of stream - uint32 get_bits (uint32 number_of_bits); - // read bits (1 <= number_of_bits <= 16) from buffer into the lower bits diff --git a/audio/maplay/files/patch-ak b/audio/maplay/files/patch-ak deleted file mode 100644 index cca6875c8c00..000000000000 --- a/audio/maplay/files/patch-ak +++ /dev/null @@ -1,21 +0,0 @@ -*** subband.h.orig Thu Jun 23 21:14:40 1994 ---- subband.h Thu Dec 9 05:45:45 1999 -*************** -*** 35,42 **** - public: - virtual void read_allocation (Ibitstream *, Header *, Crc16 *) = 0; - virtual void read_scalefactor (Ibitstream *, Header *) = 0; -! virtual bool read_sampledata (Ibitstream *) = 0; -! virtual bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *) = 0; - }; - - #endif ---- 35,42 ---- - public: - virtual void read_allocation (Ibitstream *, Header *, Crc16 *) = 0; - virtual void read_scalefactor (Ibitstream *, Header *) = 0; -! virtual boolean read_sampledata (Ibitstream *) = 0; -! virtual boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *) = 0; - }; - - #endif diff --git a/audio/maplay/files/patch-all.h b/audio/maplay/files/patch-all.h new file mode 100644 index 000000000000..05e126e58b21 --- /dev/null +++ b/audio/maplay/files/patch-all.h @@ -0,0 +1,19 @@ +*** all.h.orig Thu Jun 23 21:14:39 1994 +--- all.h Thu Dec 9 05:32:18 1999 +*************** +*** 22,28 **** + #define ALL_H + + typedef float real; // float should be enough +! typedef short bool; + typedef unsigned uint32; // 32 Bit unsigned integer + // some compilers may need "typedef unsigned long uint32" instead + typedef int int32; // 32 Bit signed integer +--- 22,28 ---- + #define ALL_H + + typedef float real; // float should be enough +! typedef short boolean; + typedef unsigned uint32; // 32 Bit unsigned integer + // some compilers may need "typedef unsigned long uint32" instead + typedef int int32; // 32 Bit signed integer diff --git a/audio/maplay/files/patch-am b/audio/maplay/files/patch-am deleted file mode 100644 index d92c2f421598..000000000000 --- a/audio/maplay/files/patch-am +++ /dev/null @@ -1,65 +0,0 @@ -*** subband_layer_1.h.orig Thu Jun 23 21:14:40 1994 ---- subband_layer_1.h Thu Dec 9 05:32:19 1999 -*************** -*** 42,49 **** - SubbandLayer1 (uint32 subbandnumber); - void read_allocation (Ibitstream *, Header *, Crc16 *); - void read_scalefactor (Ibitstream *, Header *); -! bool read_sampledata (Ibitstream *); -! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *); - }; - - ---- 42,49 ---- - SubbandLayer1 (uint32 subbandnumber); - void read_allocation (Ibitstream *, Header *, Crc16 *); - void read_scalefactor (Ibitstream *, Header *); -! boolean read_sampledata (Ibitstream *); -! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *); - }; - - -*************** -*** 60,70 **** - SubbandLayer1::read_allocation (stream, header, crc); - } - void read_scalefactor (Ibitstream *, Header *); -! bool read_sampledata (Ibitstream *stream) - { - return SubbandLayer1::read_sampledata (stream); - } -! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *); - }; - - ---- 60,70 ---- - SubbandLayer1::read_allocation (stream, header, crc); - } - void read_scalefactor (Ibitstream *, Header *); -! boolean read_sampledata (Ibitstream *stream) - { - return SubbandLayer1::read_sampledata (stream); - } -! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *); - }; - - -*************** -*** 82,89 **** - SubbandLayer1Stereo (uint32 subbandnumber); - void read_allocation (Ibitstream *, Header *, Crc16 *); - void read_scalefactor (Ibitstream *, Header *); -! bool read_sampledata (Ibitstream *); -! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *); - }; - - #endif ---- 82,89 ---- - SubbandLayer1Stereo (uint32 subbandnumber); - void read_allocation (Ibitstream *, Header *, Crc16 *); - void read_scalefactor (Ibitstream *, Header *); -! boolean read_sampledata (Ibitstream *); -! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *); - }; - - #endif diff --git a/audio/maplay/files/patch-an b/audio/maplay/files/patch-an deleted file mode 100644 index b30d8ad479a6..000000000000 --- a/audio/maplay/files/patch-an +++ /dev/null @@ -1,97 +0,0 @@ -*** subband_layer_2.cc.orig Thu Jun 23 21:14:36 1994 ---- subband_layer_2.cc Thu Dec 9 05:32:19 1999 -*************** -*** 591,597 **** - } - - -! bool SubbandLayer2::read_sampledata (Ibitstream *stream) - { - if (allocation) - if (groupingtable) ---- 591,597 ---- - } - - -! boolean SubbandLayer2::read_sampledata (Ibitstream *stream) - { - if (allocation) - if (groupingtable) -*************** -*** 633,639 **** - } - - -! bool SubbandLayer2::put_next_sample (e_channels channels, - SynthesisFilter *filter1, SynthesisFilter *) - { - #ifdef DEBUG ---- 633,639 ---- - } - - -! boolean SubbandLayer2::put_next_sample (e_channels channels, - SynthesisFilter *filter1, SynthesisFilter *) - { - #ifdef DEBUG -*************** -*** 726,732 **** - } - - -! bool SubbandLayer2IntensityStereo::put_next_sample (e_channels channels, - SynthesisFilter *filter1, SynthesisFilter *filter2) - { - #ifdef DEBUG ---- 726,732 ---- - } - - -! boolean SubbandLayer2IntensityStereo::put_next_sample (e_channels channels, - SynthesisFilter *filter1, SynthesisFilter *filter2) - { - #ifdef DEBUG -*************** -*** 880,888 **** - } - - -! bool SubbandLayer2Stereo::read_sampledata (Ibitstream *stream) - { -! bool returnvalue = SubbandLayer2::read_sampledata (stream); - - if (channel2_allocation) - if (channel2_groupingtable) ---- 880,888 ---- - } - - -! boolean SubbandLayer2Stereo::read_sampledata (Ibitstream *stream) - { -! boolean returnvalue = SubbandLayer2::read_sampledata (stream); - - if (channel2_allocation) - if (channel2_groupingtable) -*************** -*** 919,928 **** - } - - -! bool SubbandLayer2Stereo::put_next_sample (e_channels channels, - SynthesisFilter *filter1, SynthesisFilter *filter2) - { -! bool returnvalue = SubbandLayer2::put_next_sample (channels, filter1, filter2); - if (channel2_allocation && channels != left) - { - register real sample = channel2_samples[samplenumber - 1]; ---- 919,928 ---- - } - - -! boolean SubbandLayer2Stereo::put_next_sample (e_channels channels, - SynthesisFilter *filter1, SynthesisFilter *filter2) - { -! boolean returnvalue = SubbandLayer2::put_next_sample (channels, filter1, filter2); - if (channel2_allocation && channels != left) - { - register real sample = channel2_samples[samplenumber - 1]; diff --git a/audio/maplay/files/patch-ao b/audio/maplay/files/patch-ao deleted file mode 100644 index 313ab9b2c1fb..000000000000 --- a/audio/maplay/files/patch-ao +++ /dev/null @@ -1,82 +0,0 @@ -*** subband_layer_2.h.orig Thu Jun 23 21:14:40 1994 ---- subband_layer_2.h Thu Dec 9 05:32:19 1999 -*************** -*** 55,62 **** - void read_allocation (Ibitstream *, Header *, Crc16 *); - virtual void read_scalefactor_selection (Ibitstream *, Crc16 *); - void read_scalefactor (Ibitstream *, Header *); -! bool read_sampledata (Ibitstream *); -! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter * = NULL); - }; - - ---- 55,62 ---- - void read_allocation (Ibitstream *, Header *, Crc16 *); - virtual void read_scalefactor_selection (Ibitstream *, Crc16 *); - void read_scalefactor (Ibitstream *, Header *); -! boolean read_sampledata (Ibitstream *); -! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter * = NULL); - }; - - -*************** -*** 75,85 **** - } - void read_scalefactor_selection (Ibitstream *, Crc16 *); - void read_scalefactor (Ibitstream *, Header *); -! bool read_sampledata (Ibitstream *stream) - { - return SubbandLayer2::read_sampledata (stream); - } -! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *); - }; - - ---- 75,85 ---- - } - void read_scalefactor_selection (Ibitstream *, Crc16 *); - void read_scalefactor (Ibitstream *, Header *); -! boolean read_sampledata (Ibitstream *stream) - { - return SubbandLayer2::read_sampledata (stream); - } -! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *); - }; - - -*************** -*** 90,96 **** - uint32 channel2_allocation; - uint32 channel2_scfsi; - real channel2_scalefactor1, channel2_scalefactor2, channel2_scalefactor3; -! bool channel2_grouping; - uint32 channel2_codelength; - const real *channel2_groupingtable; - real channel2_factor; ---- 90,96 ---- - uint32 channel2_allocation; - uint32 channel2_scfsi; - real channel2_scalefactor1, channel2_scalefactor2, channel2_scalefactor3; -! boolean channel2_grouping; - uint32 channel2_codelength; - const real *channel2_groupingtable; - real channel2_factor; -*************** -*** 102,109 **** - void read_allocation (Ibitstream *, Header *, Crc16 *); - void read_scalefactor_selection (Ibitstream *, Crc16 *); - void read_scalefactor (Ibitstream *, Header *); -! bool read_sampledata (Ibitstream *); -! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *); - }; - - #endif ---- 102,109 ---- - void read_allocation (Ibitstream *, Header *, Crc16 *); - void read_scalefactor_selection (Ibitstream *, Crc16 *); - void read_scalefactor (Ibitstream *, Header *); -! boolean read_sampledata (Ibitstream *); -! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *); - }; - - #endif diff --git a/audio/maplay/files/patch-ap b/audio/maplay/files/patch-ap deleted file mode 100644 index 05e126e58b21..000000000000 --- a/audio/maplay/files/patch-ap +++ /dev/null @@ -1,19 +0,0 @@ -*** all.h.orig Thu Jun 23 21:14:39 1994 ---- all.h Thu Dec 9 05:32:18 1999 -*************** -*** 22,28 **** - #define ALL_H - - typedef float real; // float should be enough -! typedef short bool; - typedef unsigned uint32; // 32 Bit unsigned integer - // some compilers may need "typedef unsigned long uint32" instead - typedef int int32; // 32 Bit signed integer ---- 22,28 ---- - #define ALL_H - - typedef float real; // float should be enough -! typedef short boolean; - typedef unsigned uint32; // 32 Bit unsigned integer - // some compilers may need "typedef unsigned long uint32" instead - typedef int int32; // 32 Bit signed integer diff --git a/audio/maplay/files/patch-configuration.sh b/audio/maplay/files/patch-configuration.sh new file mode 100644 index 000000000000..c60df37ab9b4 --- /dev/null +++ b/audio/maplay/files/patch-configuration.sh @@ -0,0 +1,32 @@ +*** configuration.sh.orig Thu Jun 23 21:14:46 1994 +--- configuration.sh Thu Dec 9 05:21:02 1999 +*************** +*** 72,77 **** +--- 72,87 ---- + INCLUDEDIRS= + LIBRARIES= + AUDIO_INCLUDES='#include ' ;; ++ FreeBSD*) ++ COMPILER='${CXX}' ++ if [ ${ARCH} = "i386" ]; then ++ COMPILERFLAGS='-DLINUX -DDAMN_INTEL_BYTE_ORDER' ++ else ++ COMPILERFLAGS='-DLINUX' ++ fi ++ INCLUDEDIRS= ++ LIBRARIES= ++ AUDIO_INCLUDES='#include ' ;; + Linux*) + COMPILER=g++ + COMPILERFLAGS='-O2 -m486 -funroll-loops -DLINUX -DDAMN_INTEL_BYTE_ORDER' +*************** +*** 95,98 **** + echo $AUDIO_INCLUDES >audio_includes.h + fi + +! make all +--- 105,108 ---- + echo $AUDIO_INCLUDES >audio_includes.h + fi + +! make maplay diff --git a/audio/maplay/files/patch-header.h b/audio/maplay/files/patch-header.h new file mode 100644 index 000000000000..342deecaf589 --- /dev/null +++ b/audio/maplay/files/patch-header.h @@ -0,0 +1,61 @@ +*** header.h.orig Thu Jun 23 21:14:40 1994 +--- header.h Thu Dec 9 05:45:44 1999 +*************** +*** 39,45 **** + e_mode h_mode; + e_sample_frequency h_sample_frequency; + uint32 h_number_of_subbands, h_intensity_stereo_bound; +! bool h_copyright, h_original; + Crc16 *crc; + uint16 checksum; + +--- 39,45 ---- + e_mode h_mode; + e_sample_frequency h_sample_frequency; + uint32 h_number_of_subbands, h_intensity_stereo_bound; +! boolean h_copyright, h_original; + Crc16 *crc; + uint16 checksum; + +*************** +*** 48,54 **** + public: + Header (void) { crc = (Crc16 *)0; } + ~Header (void) { if (crc) delete crc; } +! bool read_header (Ibitstream *, Crc16 **); + // read a 32-bit header from the bitstream + + // functions to query header contents: +--- 48,54 ---- + public: + Header (void) { crc = (Crc16 *)0; } + ~Header (void) { if (crc) delete crc; } +! boolean read_header (Ibitstream *, Crc16 **); + // read a 32-bit header from the bitstream + + // functions to query header contents: +*************** +*** 58,68 **** + uint32 frequency (void) { return frequencies[h_sample_frequency]; } + static uint32 frequency (e_sample_frequency rate) { return frequencies[rate]; } + e_mode mode (void) { return h_mode; }; +! bool checksums (void) { return !h_protection_bit; } +! bool copyright (void) { return h_copyright; } +! bool original (void) { return h_original; } + +! bool checksum_ok (void) { return checksum == crc->checksum (); } + // compares computed checksum with stream checksum + + // functions which return header informations as strings: +--- 58,68 ---- + uint32 frequency (void) { return frequencies[h_sample_frequency]; } + static uint32 frequency (e_sample_frequency rate) { return frequencies[rate]; } + e_mode mode (void) { return h_mode; }; +! boolean checksums (void) { return !h_protection_bit; } +! boolean copyright (void) { return h_copyright; } +! boolean original (void) { return h_original; } + +! boolean checksum_ok (void) { return checksum == crc->checksum (); } + // compares computed checksum with stream checksum + + // functions which return header informations as strings: diff --git a/audio/maplay/files/patch-ibitstream.h b/audio/maplay/files/patch-ibitstream.h new file mode 100644 index 000000000000..fb92627bd6e6 --- /dev/null +++ b/audio/maplay/files/patch-ibitstream.h @@ -0,0 +1,25 @@ +*** ibitstream.h.orig Thu Jun 23 21:14:40 1994 +--- ibitstream.h Thu Dec 9 05:32:18 1999 +*************** +*** 43,52 **** + ~Ibitstream (void); + int filedescriptor (void) { return fd; }; + +! bool get_header (uint32 *); + // get next 32 bits from bitstream in an unsigned int, + // returned value False => end of stream +! bool read_frame (uint32 bytesize); + // fill buffer with data from bitstream, returned value False => end of stream + uint32 get_bits (uint32 number_of_bits); + // read bits (1 <= number_of_bits <= 16) from buffer into the lower bits +--- 43,52 ---- + ~Ibitstream (void); + int filedescriptor (void) { return fd; }; + +! boolean get_header (uint32 *); + // get next 32 bits from bitstream in an unsigned int, + // returned value False => end of stream +! boolean read_frame (uint32 bytesize); + // fill buffer with data from bitstream, returned value False => end of stream + uint32 get_bits (uint32 number_of_bits); + // read bits (1 <= number_of_bits <= 16) from buffer into the lower bits diff --git a/audio/maplay/files/patch-maplay.cc b/audio/maplay/files/patch-maplay.cc index ac553386fb82..efc0b0d38535 100644 --- a/audio/maplay/files/patch-maplay.cc +++ b/audio/maplay/files/patch-maplay.cc @@ -1,5 +1,5 @@ ---- maplay.cc.orig Thu Jun 23 22:14:36 1994 -+++ maplay.cc Thu Nov 21 16:40:21 2002 +--- maplay.cc.orig 1994-06-23 08:14:36.000000000 -0400 ++++ maplay.cc 2014-07-27 09:22:27.000000000 -0400 @@ -39,8 +39,8 @@ #include #include @@ -34,8 +34,12 @@ static real scalefactor; // data extracted from header of first frame: -@@ -93,12 +92,12 @@ - main (int argc, char *argv[]) +@@ -90,15 +89,15 @@ + } + + +-main (int argc, char *argv[]) ++int main (int argc, char *argv[]) { int i; - bool read_ready = False, write_ready = False; diff --git a/audio/maplay/files/patch-subband.h b/audio/maplay/files/patch-subband.h new file mode 100644 index 000000000000..cca6875c8c00 --- /dev/null +++ b/audio/maplay/files/patch-subband.h @@ -0,0 +1,21 @@ +*** subband.h.orig Thu Jun 23 21:14:40 1994 +--- subband.h Thu Dec 9 05:45:45 1999 +*************** +*** 35,42 **** + public: + virtual void read_allocation (Ibitstream *, Header *, Crc16 *) = 0; + virtual void read_scalefactor (Ibitstream *, Header *) = 0; +! virtual bool read_sampledata (Ibitstream *) = 0; +! virtual bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *) = 0; + }; + + #endif +--- 35,42 ---- + public: + virtual void read_allocation (Ibitstream *, Header *, Crc16 *) = 0; + virtual void read_scalefactor (Ibitstream *, Header *) = 0; +! virtual boolean read_sampledata (Ibitstream *) = 0; +! virtual boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *) = 0; + }; + + #endif diff --git a/audio/maplay/files/patch-subband_layer_1.h b/audio/maplay/files/patch-subband_layer_1.h new file mode 100644 index 000000000000..d92c2f421598 --- /dev/null +++ b/audio/maplay/files/patch-subband_layer_1.h @@ -0,0 +1,65 @@ +*** subband_layer_1.h.orig Thu Jun 23 21:14:40 1994 +--- subband_layer_1.h Thu Dec 9 05:32:19 1999 +*************** +*** 42,49 **** + SubbandLayer1 (uint32 subbandnumber); + void read_allocation (Ibitstream *, Header *, Crc16 *); + void read_scalefactor (Ibitstream *, Header *); +! bool read_sampledata (Ibitstream *); +! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *); + }; + + +--- 42,49 ---- + SubbandLayer1 (uint32 subbandnumber); + void read_allocation (Ibitstream *, Header *, Crc16 *); + void read_scalefactor (Ibitstream *, Header *); +! boolean read_sampledata (Ibitstream *); +! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *); + }; + + +*************** +*** 60,70 **** + SubbandLayer1::read_allocation (stream, header, crc); + } + void read_scalefactor (Ibitstream *, Header *); +! bool read_sampledata (Ibitstream *stream) + { + return SubbandLayer1::read_sampledata (stream); + } +! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *); + }; + + +--- 60,70 ---- + SubbandLayer1::read_allocation (stream, header, crc); + } + void read_scalefactor (Ibitstream *, Header *); +! boolean read_sampledata (Ibitstream *stream) + { + return SubbandLayer1::read_sampledata (stream); + } +! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *); + }; + + +*************** +*** 82,89 **** + SubbandLayer1Stereo (uint32 subbandnumber); + void read_allocation (Ibitstream *, Header *, Crc16 *); + void read_scalefactor (Ibitstream *, Header *); +! bool read_sampledata (Ibitstream *); +! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *); + }; + + #endif +--- 82,89 ---- + SubbandLayer1Stereo (uint32 subbandnumber); + void read_allocation (Ibitstream *, Header *, Crc16 *); + void read_scalefactor (Ibitstream *, Header *); +! boolean read_sampledata (Ibitstream *); +! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *); + }; + + #endif diff --git a/audio/maplay/files/patch-subband_layer_2.cc b/audio/maplay/files/patch-subband_layer_2.cc new file mode 100644 index 000000000000..b30d8ad479a6 --- /dev/null +++ b/audio/maplay/files/patch-subband_layer_2.cc @@ -0,0 +1,97 @@ +*** subband_layer_2.cc.orig Thu Jun 23 21:14:36 1994 +--- subband_layer_2.cc Thu Dec 9 05:32:19 1999 +*************** +*** 591,597 **** + } + + +! bool SubbandLayer2::read_sampledata (Ibitstream *stream) + { + if (allocation) + if (groupingtable) +--- 591,597 ---- + } + + +! boolean SubbandLayer2::read_sampledata (Ibitstream *stream) + { + if (allocation) + if (groupingtable) +*************** +*** 633,639 **** + } + + +! bool SubbandLayer2::put_next_sample (e_channels channels, + SynthesisFilter *filter1, SynthesisFilter *) + { + #ifdef DEBUG +--- 633,639 ---- + } + + +! boolean SubbandLayer2::put_next_sample (e_channels channels, + SynthesisFilter *filter1, SynthesisFilter *) + { + #ifdef DEBUG +*************** +*** 726,732 **** + } + + +! bool SubbandLayer2IntensityStereo::put_next_sample (e_channels channels, + SynthesisFilter *filter1, SynthesisFilter *filter2) + { + #ifdef DEBUG +--- 726,732 ---- + } + + +! boolean SubbandLayer2IntensityStereo::put_next_sample (e_channels channels, + SynthesisFilter *filter1, SynthesisFilter *filter2) + { + #ifdef DEBUG +*************** +*** 880,888 **** + } + + +! bool SubbandLayer2Stereo::read_sampledata (Ibitstream *stream) + { +! bool returnvalue = SubbandLayer2::read_sampledata (stream); + + if (channel2_allocation) + if (channel2_groupingtable) +--- 880,888 ---- + } + + +! boolean SubbandLayer2Stereo::read_sampledata (Ibitstream *stream) + { +! boolean returnvalue = SubbandLayer2::read_sampledata (stream); + + if (channel2_allocation) + if (channel2_groupingtable) +*************** +*** 919,928 **** + } + + +! bool SubbandLayer2Stereo::put_next_sample (e_channels channels, + SynthesisFilter *filter1, SynthesisFilter *filter2) + { +! bool returnvalue = SubbandLayer2::put_next_sample (channels, filter1, filter2); + if (channel2_allocation && channels != left) + { + register real sample = channel2_samples[samplenumber - 1]; +--- 919,928 ---- + } + + +! boolean SubbandLayer2Stereo::put_next_sample (e_channels channels, + SynthesisFilter *filter1, SynthesisFilter *filter2) + { +! boolean returnvalue = SubbandLayer2::put_next_sample (channels, filter1, filter2); + if (channel2_allocation && channels != left) + { + register real sample = channel2_samples[samplenumber - 1]; diff --git a/audio/maplay/files/patch-subband_layer_2.h b/audio/maplay/files/patch-subband_layer_2.h new file mode 100644 index 000000000000..313ab9b2c1fb --- /dev/null +++ b/audio/maplay/files/patch-subband_layer_2.h @@ -0,0 +1,82 @@ +*** subband_layer_2.h.orig Thu Jun 23 21:14:40 1994 +--- subband_layer_2.h Thu Dec 9 05:32:19 1999 +*************** +*** 55,62 **** + void read_allocation (Ibitstream *, Header *, Crc16 *); + virtual void read_scalefactor_selection (Ibitstream *, Crc16 *); + void read_scalefactor (Ibitstream *, Header *); +! bool read_sampledata (Ibitstream *); +! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter * = NULL); + }; + + +--- 55,62 ---- + void read_allocation (Ibitstream *, Header *, Crc16 *); + virtual void read_scalefactor_selection (Ibitstream *, Crc16 *); + void read_scalefactor (Ibitstream *, Header *); +! boolean read_sampledata (Ibitstream *); +! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter * = NULL); + }; + + +*************** +*** 75,85 **** + } + void read_scalefactor_selection (Ibitstream *, Crc16 *); + void read_scalefactor (Ibitstream *, Header *); +! bool read_sampledata (Ibitstream *stream) + { + return SubbandLayer2::read_sampledata (stream); + } +! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *); + }; + + +--- 75,85 ---- + } + void read_scalefactor_selection (Ibitstream *, Crc16 *); + void read_scalefactor (Ibitstream *, Header *); +! boolean read_sampledata (Ibitstream *stream) + { + return SubbandLayer2::read_sampledata (stream); + } +! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *); + }; + + +*************** +*** 90,96 **** + uint32 channel2_allocation; + uint32 channel2_scfsi; + real channel2_scalefactor1, channel2_scalefactor2, channel2_scalefactor3; +! bool channel2_grouping; + uint32 channel2_codelength; + const real *channel2_groupingtable; + real channel2_factor; +--- 90,96 ---- + uint32 channel2_allocation; + uint32 channel2_scfsi; + real channel2_scalefactor1, channel2_scalefactor2, channel2_scalefactor3; +! boolean channel2_grouping; + uint32 channel2_codelength; + const real *channel2_groupingtable; + real channel2_factor; +*************** +*** 102,109 **** + void read_allocation (Ibitstream *, Header *, Crc16 *); + void read_scalefactor_selection (Ibitstream *, Crc16 *); + void read_scalefactor (Ibitstream *, Header *); +! bool read_sampledata (Ibitstream *); +! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *); + }; + + #endif +--- 102,109 ---- + void read_allocation (Ibitstream *, Header *, Crc16 *); + void read_scalefactor_selection (Ibitstream *, Crc16 *); + void read_scalefactor (Ibitstream *, Header *); +! boolean read_sampledata (Ibitstream *); +! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *); + }; + + #endif -- cgit