summaryrefslogtreecommitdiff
path: root/apps/codecs/vox.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/vox.c')
-rw-r--r--apps/codecs/vox.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/codecs/vox.c b/apps/codecs/vox.c
index ff5d571e8d..c7f39342c3 100644
--- a/apps/codecs/vox.c
+++ b/apps/codecs/vox.c
@@ -46,7 +46,7 @@ static uint8_t *read_buffer(size_t *realsize)
46/* this is the codec entry point */ 46/* this is the codec entry point */
47enum codec_status codec_main(void) 47enum codec_status codec_main(void)
48{ 48{
49 int status = CODEC_OK; 49 int status;
50 uint32_t decodedsamples; 50 uint32_t decodedsamples;
51 size_t n; 51 size_t n;
52 int bufcount; 52 int bufcount;
@@ -59,14 +59,16 @@ enum codec_status codec_main(void)
59 ci->configure(DSP_SET_SAMPLE_DEPTH, PCM_OUTPUT_DEPTH-1); 59 ci->configure(DSP_SET_SAMPLE_DEPTH, PCM_OUTPUT_DEPTH-1);
60 60
61next_track: 61next_track:
62 status = CODEC_OK;
63
62 if (codec_init()) { 64 if (codec_init()) {
63 DEBUGF("codec_init() error\n"); 65 DEBUGF("codec_init() error\n");
64 status = CODEC_ERROR; 66 status = CODEC_ERROR;
65 goto exit; 67 goto exit;
66 } 68 }
67 69
68 while (!*ci->taginfo_ready && !ci->stop_codec) 70 if (codec_wait_taginfo() != 0)
69 ci->sleep(1); 71 goto done;
70 72
71 codec_set_replaygain(ci->id3); 73 codec_set_replaygain(ci->id3);
72 74
@@ -189,7 +191,6 @@ next_track:
189 endofstream = 1; 191 endofstream = 1;
190 ci->set_elapsed(decodedsamples*1000LL/ci->id3->frequency); 192 ci->set_elapsed(decodedsamples*1000LL/ci->id3->frequency);
191 } 193 }
192 status = CODEC_OK;
193 194
194done: 195done:
195 if (ci->request_next_track()) 196 if (ci->request_next_track())