diff options
author | wiz <wiz@pkgsrc.org> | 2002-08-05 17:39:16 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2002-08-05 17:39:16 +0000 |
commit | 191992f8b4aebaf8fccf17baad8d043d741dafc8 (patch) | |
tree | 06066904a10bb59ad4acfad9e771c4222dd2afaf /audio | |
parent | ebe13e5063627d51b10926947809eb649d4dd89b (diff) | |
download | pkgsrc-191992f8b4aebaf8fccf17baad8d043d741dafc8.tar.gz |
Make splay work on big-endian platforms.
Patches from Martijn van Buul in pkg/15382, tested on macppc and i386.
Diffstat (limited to 'audio')
-rw-r--r-- | audio/splay/Makefile | 14 | ||||
-rw-r--r-- | audio/splay/distinfo | 9 | ||||
-rw-r--r-- | audio/splay/patches/patch-ab | 18 | ||||
-rw-r--r-- | audio/splay/patches/patch-ac | 68 | ||||
-rw-r--r-- | audio/splay/patches/patch-ad | 47 | ||||
-rw-r--r-- | audio/splay/patches/patch-ae | 21 | ||||
-rw-r--r-- | audio/splay/patches/patch-ah | 30 |
7 files changed, 133 insertions, 74 deletions
diff --git a/audio/splay/Makefile b/audio/splay/Makefile index 0e806590cf7..d71ee3691b3 100644 --- a/audio/splay/Makefile +++ b/audio/splay/Makefile @@ -1,24 +1,14 @@ -# $NetBSD: Makefile,v 1.12 2001/06/12 20:33:01 jlam Exp $ -# FreeBSD Id: Makefile,v 1.4 1997/08/09 23:37:33 fenner Exp +# $NetBSD: Makefile,v 1.13 2002/08/05 17:39:16 wiz Exp $ # DISTNAME= splay-0.8.2 CATEGORIES= audio -MASTER_SITES= http://my.netian.com/~polarb/ \ - http://synergy.kaist.ac.kr/~jwj95/ \ - ftp://ftp.univie.ac.at/systems/linux/linuxberg/files/x11/media/ \ - ftp://ftp.tu-clausthal.de/pub/unix.new/audio/ \ - ftp://ftp.online.be/raid/linuxberg/files/x11/media/ \ - ftp://crydee.sai.msu.ru/zeus/unix/sound/players/ \ - ftp://ftp.cit.nepean.uws.edu.au/unix/misc/audio/ +MASTER_SITES= # empty MAINTAINER= packages@netbsd.org HOMEPAGE= http://splay.sourceforge.net/ COMMENT= Audio player/decoder that decodes MPEG Layer I,II,III and WAV files -# endian and alignment issues -NOT_FOR_PLATFORM= *-*-sparc *-*-m68k *-*-macppc *-*-sparc64 - GNU_CONFIGURE= yes CONFIGURE_ARGS= --without-xsplay --without-pthread LIBS+= -lossaudio diff --git a/audio/splay/distinfo b/audio/splay/distinfo index d8b6c39ad67..850c2467011 100644 --- a/audio/splay/distinfo +++ b/audio/splay/distinfo @@ -1,9 +1,10 @@ -$NetBSD: distinfo,v 1.2 2001/04/18 12:14:38 agc Exp $ +$NetBSD: distinfo,v 1.3 2002/08/05 17:39:17 wiz Exp $ SHA1 (splay-0.8.2.tar.gz) = 25288afa1b52bf25be8f9c4ceb44325c50fa00c8 Size (splay-0.8.2.tar.gz) = 109060 bytes SHA1 (patch-aa) = a1c7edc9939454e437a6ad301cd5955f59612ed5 -SHA1 (patch-ab) = a5b2e7c16a1f4d12d99bdd0d625e2732966cf067 -SHA1 (patch-ad) = 11b69c6d1eb0e26d8274ca650602fab6f3dca8da -SHA1 (patch-ah) = 4671d5a581a37e2a412ff14c2664a511a2189dbd +SHA1 (patch-ab) = ca72194251e01de99c91362da1207f310a9d52be +SHA1 (patch-ac) = f90b0e93ed4e72d20926e1bbe7dd5d21f4b39770 +SHA1 (patch-ad) = 5d52e0878eb313a7d7684a6505daa4ece3add746 +SHA1 (patch-ae) = d5733b9d73b18713e203581a6d3ea49e32a9a4b7 SHA1 (patch-ai) = 9ac8c7aa7a7d341585e57dec4ddba4e285db7b34 diff --git a/audio/splay/patches/patch-ab b/audio/splay/patches/patch-ab index 2f1bceb3277..24b82317641 100644 --- a/audio/splay/patches/patch-ab +++ b/audio/splay/patches/patch-ab @@ -1,21 +1,26 @@ -$NetBSD: patch-ab,v 1.4 2000/02/20 18:30:39 dmcmahill Exp $ +$NetBSD: patch-ab,v 1.5 2002/08/05 17:39:18 wiz Exp $ ---- mpegsound/mpegsound.h.orig Fri Mar 6 12:43:55 1998 -+++ mpegsound/mpegsound.h Sun Feb 20 13:02:24 2000 -@@ -12,4 +12,5 @@ +--- mpegsound/mpegsound.h.orig Fri Mar 6 18:43:55 1998 ++++ mpegsound/mpegsound.h +@@ -11,6 +11,7 @@ + /************************************/ #include <stdio.h> #include <sys/types.h> +#include <machine/endian.h> #ifdef PTHREADEDMPEG -@@ -91,4 +92,6 @@ + #ifdef HAVE_PTHREAD_H +@@ -90,6 +91,8 @@ + /*******************************************/ /* Define values for Microsoft WAVE format */ /*******************************************/ +#if defined(BYTE_ORDER) && (BYTE_ORDER == LITTLE_ENDIAN ) + #define RIFF 0x46464952 #define WAVE 0x45564157 -@@ -101,4 +104,19 @@ + #define FMT 0x20746D66 +@@ -100,6 +103,21 @@ + #define MODE_MONO 0 #define MODE_STEREO 1 + @@ -35,3 +40,4 @@ $NetBSD: patch-ab,v 1.4 2000/02/20 18:30:39 dmcmahill Exp $ +#endif /********************/ + /* Type definitions */ diff --git a/audio/splay/patches/patch-ac b/audio/splay/patches/patch-ac new file mode 100644 index 00000000000..15964c05790 --- /dev/null +++ b/audio/splay/patches/patch-ac @@ -0,0 +1,68 @@ +$NetBSD: patch-ac,v 1.5 2002/08/05 17:39:18 wiz Exp $ + +--- mpegsound/mpeglayer3.cc.orig Fri Mar 6 18:43:55 1998 ++++ mpegsound/mpeglayer3.cc +@@ -21,6 +21,7 @@ + #include "mpegsound.h" + #include "mpegsound_locals.h" + ++ + inline void Mpegbitwindow::wrap(void) + { + int p=bitindex>>3; +@@ -45,18 +46,9 @@ + inline int Mpegbitwindow::getbits9(int bits) + { + register unsigned short a; ++ int offset=bitindex>>3; + +-#ifndef WORDS_BIGENDIAN +- { +- // int offset=(bitindex>>3)&(WINDOWSIZE-1); +- int offset=bitindex>>3; +- +- a=(((unsigned char)buffer[offset])<<8) | ((unsigned char)buffer[offset+1]); +- } +-#else +- // a=((unsigned short *)(buffer+((bixindex>>3)&(WINDOWSIZE-1)))); +- a=((unsigned short *)(buffer+((bixindex>>3)))); +-#endif ++ a=(((unsigned char)buffer[offset])<<8) | ((unsigned char)buffer[offset+1]); + + a<<=(bitindex&7); + bitindex+=bits; +@@ -769,7 +761,7 @@ + for(i=0;i<e;) + { + const HUFFMANCODETABLE *h; +- register end; ++ register int end; + + if (i<region1Start) + { +@@ -971,7 +963,15 @@ + } + } + { +- int t_index=(index-cb_begin)/cb_width; ++ int t_index = 0; ++ if (cb_width) ++ { ++ t_index=(index-cb_begin)/cb_width; ++ if (t_index > 2) ++ t_index = 0; ++ } ++ else ++ fprintf(stderr, "Very bad mp3 data\n"); + out[0][index]*=layer3twopow2_1(gi->subblock_gain[t_index], + gi->scalefac_scale, + scalefactors[ch].s[t_index][cb]); +@@ -1392,7 +1392,7 @@ + { + if(gi->mixed_block_flag) + { +- fprintf(stderr,"Notchecked!"); ++ fprintf(stderr, "Mpegtoraw::layer3reorderandantialias:Not checked!"); + layer3reorder_1 (version,frequency,in,out); // Not checked... + layer3antialias_1(out); + } diff --git a/audio/splay/patches/patch-ad b/audio/splay/patches/patch-ad index 9e0711965d8..17ff7e42692 100644 --- a/audio/splay/patches/patch-ad +++ b/audio/splay/patches/patch-ad @@ -1,39 +1,42 @@ -$NetBSD: patch-ad,v 1.4 2000/02/20 18:30:39 dmcmahill Exp $ +$NetBSD: patch-ad,v 1.5 2002/08/05 17:39:18 wiz Exp $ ---- mpegsound/mpegsound_locals.h.orig Fri Mar 6 12:43:55 1998 -+++ mpegsound/mpegsound_locals.h Sun Feb 20 10:43:00 2000 -@@ -21,13 +21,13 @@ +--- mpegsound/mpegsound_locals.h.orig Fri Mar 6 18:43:55 1998 ++++ mpegsound/mpegsound_locals.h +@@ -20,15 +21,9 @@ + inline int Mpegtoraw::getbits9(int bits) { register unsigned short a; -#ifndef WORDS_BIGENDIAN -+ - { - int offset=bitindex>>3; +- { +- int offset=bitindex>>3; - -+#ifndef WORDS_BIGENDIAN - a=(((unsigned char)buffer[offset])<<8) | ((unsigned char)buffer[offset+1]); +- a=(((unsigned char)buffer[offset])<<8) | ((unsigned char)buffer[offset+1]); - } - #else +-#else - a=((unsigned short *)(buffer+((bixindex>>3)))); -+ a=(unsigned short)(buffer[offset]); - #endif -+ } +-#endif ++ int offset=bitindex>>3; ++ ++ a=(((unsigned char)buffer[offset])<<8) | ((unsigned char)buffer[offset+1]); a<<=(bitindex&7); -@@ -40,13 +40,12 @@ + bitindex+=bits; +@@ -38,16 +33,9 @@ + inline int Mpegtoraw::getbits8(void) + { register unsigned short a; ++ int offset=bitindex>>3; -#ifndef WORDS_BIGENDIAN - { - int offset=bitindex>>3; +- { +- int offset=bitindex>>3; - -+#ifndef WORDS_BIGENDIAN - a=(((unsigned char)buffer[offset])<<8) | ((unsigned char)buffer[offset+1]); +- a=(((unsigned char)buffer[offset])<<8) | ((unsigned char)buffer[offset+1]); - } - #else +-#else - a=((unsigned short *)(buffer+((bixindex>>3)))); -+ a=(unsigned short)(buffer[offset]); - #endif -+ } +-#endif ++ a=(((unsigned char)buffer[offset])<<8) | ((unsigned char)buffer[offset+1]); a<<=(bitindex&7); + bitindex+=8; diff --git a/audio/splay/patches/patch-ae b/audio/splay/patches/patch-ae new file mode 100644 index 00000000000..0c6c6b169dc --- /dev/null +++ b/audio/splay/patches/patch-ae @@ -0,0 +1,21 @@ +$NetBSD: patch-ae,v 1.4 2002/08/05 17:39:19 wiz Exp $ + +--- mpegsound/mpegtoraw.cc.orig Fri Mar 6 18:43:55 1998 ++++ mpegsound/mpegtoraw.cc +@@ -15,6 +15,7 @@ + + #include "mpegsound.h" + #include "mpegsound_locals.h" ++#include <soundcard.h> + + #define MY_PI 3.14159265358979323846 + +@@ -618,7 +619,7 @@ + if(frames<0) + { + frames=-frames; +- player->setsoundtype(outputstereo,16, ++ player->setsoundtype(outputstereo,AFMT_S16_NE, + frequencies[version][frequency]>>downfrequency); + } + diff --git a/audio/splay/patches/patch-ah b/audio/splay/patches/patch-ah deleted file mode 100644 index 846e97524fa..00000000000 --- a/audio/splay/patches/patch-ah +++ /dev/null @@ -1,30 +0,0 @@ -$NetBSD: patch-ah,v 1.4 2000/02/20 18:30:39 dmcmahill Exp $ - ---- mpegsound/mpeglayer3.cc.orig Fri Mar 6 12:43:55 1998 -+++ mpegsound/mpeglayer3.cc Sun Feb 20 10:48:43 2000 -@@ -47,15 +47,14 @@ - register unsigned short a; - --#ifndef WORDS_BIGENDIAN - { - // int offset=(bitindex>>3)&(WINDOWSIZE-1); - int offset=bitindex>>3; - -+#ifndef WORDS_BIGENDIAN - a=(((unsigned char)buffer[offset])<<8) | ((unsigned char)buffer[offset+1]); -- } - #else -- // a=((unsigned short *)(buffer+((bixindex>>3)&(WINDOWSIZE-1)))); -- a=((unsigned short *)(buffer+((bixindex>>3)))); -+ a=(unsigned short)(buffer[offset]); - #endif -+ } - - a<<=(bitindex&7); -@@ -770,5 +769,5 @@ - { - const HUFFMANCODETABLE *h; -- register end; -+ register int end; - - if (i<region1Start) |