summaryrefslogtreecommitdiff
path: root/apps/plugins/test_codec.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/test_codec.c')
-rw-r--r--apps/plugins/test_codec.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/apps/plugins/test_codec.c b/apps/plugins/test_codec.c
index 9b00fdbb95..30757381bf 100644
--- a/apps/plugins/test_codec.c
+++ b/apps/plugins/test_codec.c
@@ -516,13 +516,6 @@ static bool request_next_track(void)
516} 516}
517 517
518 518
519/* Free the buffer area of the current codec after its loaded */
520static void discard_codec(void)
521{
522 /* ??? */
523}
524
525
526static void set_offset(size_t value) 519static void set_offset(size_t value)
527{ 520{
528 /* ??? */ 521 /* ??? */
@@ -576,7 +569,6 @@ static void init_ci(void)
576 ci.seek_buffer = seek_buffer; 569 ci.seek_buffer = seek_buffer;
577 ci.seek_complete = seek_complete; 570 ci.seek_complete = seek_complete;
578 ci.request_next_track = request_next_track; 571 ci.request_next_track = request_next_track;
579 ci.discard_codec = discard_codec;
580 ci.set_offset = set_offset; 572 ci.set_offset = set_offset;
581 ci.configure = configure; 573 ci.configure = configure;
582 ci.dsp = (struct dsp_config *)rb->dsp_configure(NULL, DSP_MYDSP, 574 ci.dsp = (struct dsp_config *)rb->dsp_configure(NULL, DSP_MYDSP,
@@ -636,12 +628,19 @@ static void init_ci(void)
636static void codec_thread(void) 628static void codec_thread(void)
637{ 629{
638 const char* codecname; 630 const char* codecname;
639 int res; 631 void *handle;
632 int res = CODEC_ERROR;
640 633
641 codecname = rb->get_codec_filename(track.id3.codectype); 634 codecname = rb->get_codec_filename(track.id3.codectype);
642 635
643 /* Load the codec and start decoding. */ 636 /* Load the codec and start decoding. */
644 res = rb->codec_load_file(codecname,&ci); 637 handle = rb->codec_load_file(codecname,&ci);
638
639 if (handle != NULL)
640 {
641 res = rb->codec_begin(handle);
642 rb->codec_close(handle);
643 }
645 644
646 /* Signal to the main thread that we are done */ 645 /* Signal to the main thread that we are done */
647 endtick = *rb->current_tick - rebuffertick; 646 endtick = *rb->current_tick - rebuffertick;