diff options
| author | Wincent Balin <wincent@rockbox.org> | 2010-06-01 00:23:59 +0000 |
|---|---|---|
| committer | Wincent Balin <wincent@rockbox.org> | 2010-06-01 00:23:59 +0000 |
| commit | a266ff185a3f03b6fde88df6eca0c4941c8564f2 (patch) | |
| tree | b6878961d12be55576f0577be9fd86d2c4a443df /apps/plugins/pdbox/PDa/src/d_soundfile.c | |
| parent | dc496d6fbebc1a55e5e519deb946a31c0cb748b8 (diff) | |
| download | rockbox-a266ff185a3f03b6fde88df6eca0c4941c8564f2.zip rockbox-a266ff185a3f03b6fde88df6eca0c4941c8564f2.tar.gz rockbox-a266ff185a3f03b6fde88df6eca0c4941c8564f2.tar.bz2 rockbox-a266ff185a3f03b6fde88df6eca0c4941c8564f2.tar.xz | |
pdbox: Solved issue with WAV file import on big-endian targets (signed 16-bit files only); small I/O-related workaround in g_array.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26439 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/pdbox/PDa/src/d_soundfile.c')
| -rw-r--r-- | apps/plugins/pdbox/PDa/src/d_soundfile.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/plugins/pdbox/PDa/src/d_soundfile.c b/apps/plugins/pdbox/PDa/src/d_soundfile.c index a231923..c8016ff 100644 --- a/apps/plugins/pdbox/PDa/src/d_soundfile.c +++ b/apps/plugins/pdbox/PDa/src/d_soundfile.c @@ -423,7 +423,14 @@ static void soundfile_xferin(int sfchannels, int nvecs, t_sample **vecs, { for (j = 0, sp2 = sp, fp=vecs[i] + itemsread; j < nitems; j++, sp2 += bytesperframe, fp++) +#ifdef ROCKBOX_BIG_ENDIAN + { + short xx = (sp2[1] << 8) | sp2[0]; + *fp = xx << (fix1-16); + } +#else *fp = ((short*)sp2)[0]<<(fix1-16); +#endif } } else if (bytespersamp == 3) |