1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Miika Pekkarinen 2007-02-14 19:20:13 +00:00
parent 9d5f73cd85
commit 7a395a23bf
3 changed files with 27 additions and 90 deletions

View file

@ -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. */