diff options
| author | Dave Chapman <dave@dchapman.com> | 2005-10-06 19:27:43 +0000 |
|---|---|---|
| committer | Dave Chapman <dave@dchapman.com> | 2005-10-06 19:27:43 +0000 |
| commit | 9e19c95d8efc78a22a32b4a77f9c4a0b4e64125c (patch) | |
| tree | 1d0bc7970de2cd2f4fa365614f84f12517ad1b5f /apps/plugins | |
| parent | 1c3a83c44e6dd18990d813c2f12e83bab67f313a (diff) | |
| download | rockbox-9e19c95d8efc78a22a32b4a77f9c4a0b4e64125c.zip rockbox-9e19c95d8efc78a22a32b4a77f9c4a0b4e64125c.tar.gz rockbox-9e19c95d8efc78a22a32b4a77f9c4a0b4e64125c.tar.bz2 rockbox-9e19c95d8efc78a22a32b4a77f9c4a0b4e64125c.tar.xz | |
Replace SWAB16 and SWAB32 with a comprehensive set of byte-swap macros - letoh16, letoh32, htole16, htole32, betoh16, betoh32, htobe16 and htobe32
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7584 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/midi/guspat.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/plugins/midi/guspat.c b/apps/plugins/midi/guspat.c index 23b6811..6f1866c 100644 --- a/apps/plugins/midi/guspat.c +++ b/apps/plugins/midi/guspat.c @@ -97,12 +97,11 @@ struct GWaveform * loadWaveform(int file) */ - /* Iriver needs byteswapping.. big endian, go figure. Gus files are little endian */ - -#if !defined(SIMULATOR) +#ifdef ROCKBOX_BIG_ENDIAN + /* Byte-swap if necessary. Gus files are little endian */ for(a=0; a<wav->numSamples; a++) { - ((unsigned short *) wav->data)[a] = SWAB16(((unsigned short *) wav->data)[a]); + ((unsigned short *) wav->data)[a] = letoh16(((unsigned short *) wav->data)[a]); } #endif |