Note: Due to technical difficulties, the Archives are currently not up to date.
GMANE provides an alternative service for most mailing lists. c.f. bug 424647
List Archive: gentoo-commits
josejx 07/09/08 06:05:02
Added: trommler-be.patch
Log:
Added patch for big endian systems, marked ppc stable.
(Portage version: 2.1.3.7)
Revision Changes Path
1.1 media-sound/trommler/files/trommler-be.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/trommler/files/trommler-be.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/trommler/files/trommler-be.patch?rev=1.1&content-type=text/plain
Index: trommler-be.patch
===================================================================
--- drummer.c 2004-05-10 22:20:47.000000000 -0400
+++ /home/jjezak/Trommler/drummer.c 2007-09-07 22:53:57.000000000 -0400
@@ -408,6 +408,16 @@
fseek(fp,0,SEEK_SET);
DRUM_SAMPLE(drum) = calloc(DRUM_LENGTH(drum),sizeof(INT16));
fread(DRUM_SAMPLE(drum),sizeof(INT16),DRUM_LENGTH(drum),fp);
+
+ /* Big endian swap fix */
+#ifdef __BIG_ENDIAN__
+ int i;
+ INT16 *p = DRUM_SAMPLE(drum);
+ for(i=0; i<DRUM_LENGTH(drum); i++){
+ *p = (INT16) (*p << 8 | *p >> 8);
+ p++;
+ }
+#endif /* __BIG_ENDIAN */
fclose(fp);
}
--- soundcard.c 2004-05-07 18:18:50.000000000 -0400
+++ /home/jjezak/Trommler/soundcard.c 2007-09-07 22:53:57.000000000 -0400
@@ -105,7 +105,11 @@
}Soundcard =
{
-1,
+#ifdef __BIG_ENDIAN__
+ AFMT_S16_BE,
+#else
AFMT_S16_LE,
+#endif /* __BIG_ENDIAN__ */
#ifdef MAIN
1,
#else
--
gentoo-commits@g.o mailing list
|
|