From 52f51da55f2344e3c235c5fc28b2e7d3a3a576db Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Feb 02 2008 21:40:07 +0000 Subject: - Fix hopefully the last endian issue in unsf --- diff --git a/gt-0.4-unsf-bigendian-fix.patch b/gt-0.4-unsf-bigendian-fix.patch index c94f6b7..b643b57 100644 --- a/gt-0.4-unsf-bigendian-fix.patch +++ b/gt-0.4-unsf-bigendian-fix.patch @@ -1,7 +1,15 @@ -diff -up gt-0.4/utils/unsf.c~ gt-0.4/utils/unsf.c ---- gt-0.4/utils/unsf.c~ 2008-02-01 13:41:46.000000000 +0100 -+++ gt-0.4/utils/unsf.c 2008-02-01 13:43:18.000000000 +0100 -@@ -290,59 +290,6 @@ double bend_coarse[128] = { +diff -up gt-0.4/utils/unsf.c.endian gt-0.4/utils/unsf.c +--- gt-0.4/utils/unsf.c.endian 2008-02-02 22:37:07.000000000 +0100 ++++ gt-0.4/utils/unsf.c 2008-02-02 22:39:10.000000000 +0100 +@@ -67,6 +67,7 @@ + #include + #include + #include ++#include + + #ifndef TRUE + #define TRUE -1 +@@ -290,59 +291,6 @@ double bend_coarse[128] = { 1290.1591550923506, 1366.8760106701147, 1448.1546878700494, 1534.2664467217226 }; @@ -61,7 +69,7 @@ diff -up gt-0.4/utils/unsf.c~ gt-0.4/utils/unsf.c static char *getname(char *p) { int i, j, e; -@@ -425,14 +372,8 @@ static void mem_write8(int val) +@@ -425,14 +373,8 @@ static void mem_write8(int val) /* writes a word to the memory buffer (little endian) */ static void mem_write16(int val) { @@ -76,7 +84,7 @@ diff -up gt-0.4/utils/unsf.c~ gt-0.4/utils/unsf.c } -@@ -440,41 +381,13 @@ static void mem_write16(int val) +@@ -440,41 +382,13 @@ static void mem_write16(int val) /* writes a long to the memory buffer (little endian) */ static void mem_write32(int val) { @@ -118,7 +126,21 @@ diff -up gt-0.4/utils/unsf.c~ gt-0.4/utils/unsf.c /* writes a block of data the memory buffer */ static void mem_write_block(void *data, int size) { -@@ -3254,9 +3167,6 @@ static int get16(FILE *f) +@@ -708,8 +622,13 @@ static int sf_num_preset_indexes = 0; + /* SoundFont preset generators */ + typedef struct rangesType + { ++#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned char byLo; + unsigned char byHi; ++#else ++ unsigned char byHi; ++ unsigned char byLo; ++#endif + } rangesType; + + +@@ -3254,9 +3173,6 @@ static int get16(FILE *f) b1 = get8(f); b2 = get8(f); @@ -128,7 +150,7 @@ diff -up gt-0.4/utils/unsf.c~ gt-0.4/utils/unsf.c return ((b2 << 8) | b1); } -@@ -3272,9 +3182,6 @@ static int get32(FILE *f) +@@ -3272,9 +3188,6 @@ static int get32(FILE *f) b3 = get8(f); b4 = get8(f); @@ -138,7 +160,7 @@ diff -up gt-0.4/utils/unsf.c~ gt-0.4/utils/unsf.c return ((b4 << 24) | (b3 << 16) | (b2 << 8) | b1); } -@@ -3753,8 +3660,6 @@ int main(int argc, char *argv[]) +@@ -3753,8 +3666,6 @@ int main(int argc, char *argv[]) opt_soundfont = argv[optind]; diff --git a/gt.spec b/gt.spec index 708b5ef..1b2d876 100644 --- a/gt.spec +++ b/gt.spec @@ -1,6 +1,6 @@ Name: gt Version: 0.4 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Modified Timidity which supportes enhanced gus format patches Group: Applications/Multimedia License: GPLv2+ @@ -81,6 +81,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Feb 2 2008 Hans de Goede 0.4-6 +- Fix hopefully the last endian issue in unsf + * Fri Feb 1 2008 Hans de Goede 0.4-5 - And fix unsf for char being unsigned on ppc