summaryrefslogtreecommitdiff
path: root/apps/talk.c
diff options
context:
space:
mode:
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 @@
35#include "id3.h" 35#include "id3.h"
36#include "logf.h" 36#include "logf.h"
37#include "bitswap.h" 37#include "bitswap.h"
38#include "structec.h"
38#if CONFIG_CODEC == SWCODEC 39#if CONFIG_CODEC == SWCODEC
39#include "playback.h" 40#include "playback.h"
40#endif 41#endif
@@ -183,12 +184,7 @@ static void load_voicefile(void)
183 184
184#ifdef ROCKBOX_LITTLE_ENDIAN 185#ifdef ROCKBOX_LITTLE_ENDIAN
185 logf("Byte swapping voice file"); 186 logf("Byte swapping voice file");
186 p_voicefile = (struct voicefile*)audiobuf; 187 structec_convert(audiobuf, "llll", 1, true);
187 p_voicefile->version = swap32(p_voicefile->version);
188 p_voicefile->table = swap32(p_voicefile->table);
189 p_voicefile->id1_max = swap32(p_voicefile->id1_max);
190 p_voicefile->id2_max = swap32(p_voicefile->id2_max);
191 p_voicefile = NULL;
192#endif 188#endif
193 189
194 if (((struct voicefile*)audiobuf)->table /* format check */ 190 if (((struct voicefile*)audiobuf)->table /* format check */
@@ -208,12 +204,7 @@ static void load_voicefile(void)
208 204
209#ifdef ROCKBOX_LITTLE_ENDIAN 205#ifdef ROCKBOX_LITTLE_ENDIAN
210 for (i = 0; i < p_voicefile->id1_max + p_voicefile->id2_max; i++) 206 for (i = 0; i < p_voicefile->id1_max + p_voicefile->id2_max; i++)
211 { 207 structec_convert(&p_voicefile->index[i], "ll", 1, true);
212 struct clip_entry *ce;
213 ce = &p_voicefile->index[i];
214 ce->offset = swap32(ce->offset);
215 ce->size = swap32(ce->size);
216 }
217#endif 208#endif
218 209
219 /* Do a bitswap as necessary. */ 210 /* Do a bitswap as necessary. */