summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorYoshihisa Uchida <uchida@rockbox.org>2010-05-14 11:08:56 +0000
committerYoshihisa Uchida <uchida@rockbox.org>2010-05-14 11:08:56 +0000
commit32794a9eef4c77e65bbd4e8b85040fc0a6f00d63 (patch)
treedd885133251bf55e3d4eb79ed47986e552491939 /apps
parent020dddffacccda4dbf88b0f72ebed65759d858c8 (diff)
downloadrockbox-32794a9eef4c77e65bbd4e8b85040fc0a6f00d63.tar.gz
rockbox-32794a9eef4c77e65bbd4e8b85040fc0a6f00d63.zip
fix: The second playback time is not correct in playing TTA musics continuously.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26015 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/codecs/tta.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/apps/codecs/tta.c b/apps/codecs/tta.c
index 541dc2b7ef..2d531315a2 100644
--- a/apps/codecs/tta.c
+++ b/apps/codecs/tta.c
@@ -38,7 +38,7 @@ enum codec_status codec_main(void)
38{ 38{
39 tta_info info; 39 tta_info info;
40 int status = CODEC_OK; 40 int status = CODEC_OK;
41 unsigned int decodedsamples = 0; 41 unsigned int decodedsamples;
42 int endofstream; 42 int endofstream;
43 int new_pos = 0; 43 int new_pos = 0;
44 int sample_count; 44 int sample_count;
@@ -46,6 +46,7 @@ enum codec_status codec_main(void)
46 /* Generic codec initialisation */ 46 /* Generic codec initialisation */
47 ci->configure(DSP_SET_SAMPLE_DEPTH, TTA_OUTPUT_DEPTH - 1); 47 ci->configure(DSP_SET_SAMPLE_DEPTH, TTA_OUTPUT_DEPTH - 1);
48 48
49next_track:
49 if (codec_init()) 50 if (codec_init())
50 { 51 {
51 DEBUGF("codec_init() error\n"); 52 DEBUGF("codec_init() error\n");
@@ -53,16 +54,10 @@ enum codec_status codec_main(void)
53 goto exit; 54 goto exit;
54 } 55 }
55 56
56next_track:
57 while (!*ci->taginfo_ready && !ci->stop_codec) 57 while (!*ci->taginfo_ready && !ci->stop_codec)
58 ci->sleep(1); 58 ci->sleep(1);
59 59
60 if (set_tta_info(&info) < 0) 60 if (set_tta_info(&info) < 0 || player_init(&info) < 0)
61 {
62 status = CODEC_ERROR;
63 goto exit;
64 }
65 if (player_init(&info) < 0)
66 { 61 {
67 status = CODEC_ERROR; 62 status = CODEC_ERROR;
68 goto exit; 63 goto exit;
@@ -82,6 +77,7 @@ next_track:
82 } 77 }
83 78
84 /* The main decoder loop */ 79 /* The main decoder loop */
80 decodedsamples = 0;
85 endofstream = 0; 81 endofstream = 0;
86 82
87 if (ci->id3->offset > 0) 83 if (ci->id3->offset > 0)