diff options
| author | Miika Pekkarinen <miipekk@ihme.org> | 2007-02-14 19:20:13 +0000 |
|---|---|---|
| committer | Miika Pekkarinen <miipekk@ihme.org> | 2007-02-14 19:20:13 +0000 |
| commit | 7a395a23bfb17bc7d2df5950fda1b16530efd68d (patch) | |
| tree | 2d5428767bff3e92f2512653e7458689ec735bcd /apps/talk.c | |
| parent | 9d5f73cd85641932791537c7bc89256a8fb84e1d (diff) | |
| download | rockbox-7a395a23bfb17bc7d2df5950fda1b16530efd68d.zip rockbox-7a395a23bfb17bc7d2df5950fda1b16530efd68d.tar.gz rockbox-7a395a23bfb17bc7d2df5950fda1b16530efd68d.tar.bz2 rockbox-7a395a23bfb17bc7d2df5950fda1b16530efd68d.tar.xz | |
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.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/apps/talk.c b/apps/talk.c index c22b700..6629bbb 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. */ |