forked from len0rd/rockbox
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
This commit is contained in:
parent
1c3a83c44e
commit
9e19c95d8e
8 changed files with 89 additions and 60 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue