summaryrefslogtreecommitdiffstats
path: root/apps/talk.c
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2007-02-14 19:20:13 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2007-02-14 19:20:13 +0000
commit7a395a23bfb17bc7d2df5950fda1b16530efd68d (patch)
tree2d5428767bff3e92f2512653e7458689ec735bcd /apps/talk.c
parent9d5f73cd85641932791537c7bc89256a8fb84e1d (diff)
downloadrockbox-7a395a23bfb17bc7d2df5950fda1b16530efd68d.tar.gz
rockbox-7a395a23bfb17bc7d2df5950fda1b16530efd68d.tar.bz2
rockbox-7a395a23bfb17bc7d2df5950fda1b16530efd68d.zip
Start using the new endian conversion system outside tagcache also to simplify code.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12309 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/talk.c')
-rw-r--r--apps/talk.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/apps/talk.c b/apps/talk.c
index c22b70066e..6629bbb2e5 100644
--- a/apps/talk.c
+++ b/apps/talk.c
@@ -35,6 +35,7 @@
#include "id3.h"
#include "logf.h"
#include "bitswap.h"
+#include "structec.h"
#if CONFIG_CODEC == SWCODEC
#include "playback.h"
#endif
@@ -183,12 +184,7 @@ static void load_voicefile(void)
#ifdef ROCKBOX_LITTLE_ENDIAN
logf("Byte swapping voice file");
- p_voicefile = (struct voicefile*)audiobuf;
- p_voicefile->version = swap32(p_voicefile->version);
- p_voicefile->table = swap32(p_voicefile->table);
- p_voicefile->id1_max = swap32(p_voicefile->id1_max);
- p_voicefile->id2_max = swap32(p_voicefile->id2_max);
- p_voicefile = NULL;
+ structec_convert(audiobuf, "llll", 1, true);
#endif
if (((struct voicefile*)audiobuf)->table /* format check */
@@ -208,12 +204,7 @@ static void load_voicefile(void)
#ifdef ROCKBOX_LITTLE_ENDIAN
for (i = 0; i < p_voicefile->id1_max + p_voicefile->id2_max; i++)
- {
- struct clip_entry *ce;
- ce = &p_voicefile->index[i];
- ce->offset = swap32(ce->offset);
- ce->size = swap32(ce->size);
- }
+ structec_convert(&p_voicefile->index[i], "ll", 1, true);
#endif
/* Do a bitswap as necessary. */