summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs/asap.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/codecs/asap.c')
-rw-r--r--lib/rbcodec/codecs/asap.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/rbcodec/codecs/asap.c b/lib/rbcodec/codecs/asap.c
index 19b39a44c4..2c350ba450 100644
--- a/lib/rbcodec/codecs/asap.c
+++ b/lib/rbcodec/codecs/asap.c
@@ -52,6 +52,8 @@ enum codec_status codec_run(void)
52 return CODEC_ERROR; 52 return CODEC_ERROR;
53 } 53 }
54 54
55 param = ci->id3->elapsed;
56
55 codec_set_replaygain(ci->id3); 57 codec_set_replaygain(ci->id3);
56 58
57 int bytes_done =0; 59 int bytes_done =0;
@@ -86,8 +88,6 @@ enum codec_status codec_run(void)
86 ci->configure(DSP_SET_STEREO_MODE, STEREO_INTERLEAVED); 88 ci->configure(DSP_SET_STEREO_MODE, STEREO_INTERLEAVED);
87 bytesPerSample = 4; 89 bytesPerSample = 4;
88 } 90 }
89 /* reset eleapsed */
90 ci->set_elapsed(0);
91 91
92 song = asap.module_info->default_song; 92 song = asap.module_info->default_song;
93 duration = asap.module_info->durations[song]; 93 duration = asap.module_info->durations[song];
@@ -100,6 +100,11 @@ enum codec_status codec_run(void)
100 ASAP_PlaySong(&asap, song, duration); 100 ASAP_PlaySong(&asap, song, duration);
101 ASAP_MutePokeyChannels(&asap, 0); 101 ASAP_MutePokeyChannels(&asap, 0);
102 102
103 if (param)
104 goto resume_start;
105
106 ci->set_elapsed(0);
107
103 /* The main decoder loop */ 108 /* The main decoder loop */
104 while (1) { 109 while (1) {
105 enum codec_command_action action = ci->get_command(&param); 110 enum codec_command_action action = ci->get_command(&param);
@@ -108,6 +113,7 @@ enum codec_status codec_run(void)
108 break; 113 break;
109 114
110 if (action == CODEC_ACTION_SEEK_TIME) { 115 if (action == CODEC_ACTION_SEEK_TIME) {
116 resume_start:
111 /* New time is ready in param */ 117 /* New time is ready in param */
112 118
113 /* seek to pos */ 119 /* seek to pos */