pkgsrc/audio/splay/patches/patch-ad
wiz 191992f8b4 Make splay work on big-endian platforms.
Patches from Martijn van Buul in pkg/15382, tested on macppc and i386.
2002-08-05 17:39:16 +00:00

42 lines
1 KiB
Text

$NetBSD: patch-ad,v 1.5 2002/08/05 17:39:18 wiz Exp $
--- 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;
-
- a=(((unsigned char)buffer[offset])<<8) | ((unsigned char)buffer[offset+1]);
- }
-#else
- a=((unsigned short *)(buffer+((bixindex>>3))));
-#endif
+ int offset=bitindex>>3;
+
+ a=(((unsigned char)buffer[offset])<<8) | ((unsigned char)buffer[offset+1]);
a<<=(bitindex&7);
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;
-
- a=(((unsigned char)buffer[offset])<<8) | ((unsigned char)buffer[offset+1]);
- }
-#else
- a=((unsigned short *)(buffer+((bixindex>>3))));
-#endif
+ a=(((unsigned char)buffer[offset])<<8) | ((unsigned char)buffer[offset+1]);
a<<=(bitindex&7);
bitindex+=8;