summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/playback.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 8843e00ca2..75f1200d68 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1200,9 +1200,6 @@ static bool codec_load_next_track(void)
1200 1200
1201 prev_track_elapsed = curtrack_id3.elapsed; 1201 prev_track_elapsed = curtrack_id3.elapsed;
1202 1202
1203 if (ci.seek_time)
1204 codec_seek_complete_callback();
1205
1206#ifdef AB_REPEAT_ENABLE 1203#ifdef AB_REPEAT_ENABLE
1207 ab_end_of_track_report(); 1204 ab_end_of_track_report();
1208#endif 1205#endif
@@ -1254,11 +1251,6 @@ static bool codec_request_next_track_callback(void)
1254 if (!codec_load_next_track()) 1251 if (!codec_load_next_track())
1255 return false; 1252 return false;
1256 1253
1257 /* Seek to the beginning of the new track because if the struct mp3entry was
1258 buffered, "elapsed" might not be zero (if the track has been played
1259 already but not unbuffered) */
1260 codec_seek_buffer_callback(curtrack_id3.first_frame_offset);
1261
1262 /* Check if the next codec is the same file. */ 1254 /* Check if the next codec is the same file. */
1263 if (prev_codectype == get_codec_base_type(curtrack_id3.codectype)) 1255 if (prev_codectype == get_codec_base_type(curtrack_id3.codectype))
1264 { 1256 {
@@ -2345,6 +2337,13 @@ static void audio_finalise_track_change(void)
2345 clear_track_info(prev_ti); 2337 clear_track_info(prev_ti);
2346 } 2338 }
2347 2339
2340 if (prev_ti && prev_ti->id3_hid >= 0)
2341 {
2342 /* Reset the elapsed time to force the progressbar to be empty if
2343 the user skips back to this track */
2344 bufgetid3(prev_ti->id3_hid)->elapsed = 0;
2345 }
2346
2348 if (track_changed_callback) 2347 if (track_changed_callback)
2349 track_changed_callback(&curtrack_id3); 2348 track_changed_callback(&curtrack_id3);
2350 2349
@@ -2473,6 +2472,13 @@ static void audio_thread(void)
2473 LOGFQUEUE("audio < Q_AUDIO_FF_REWIND"); 2472 LOGFQUEUE("audio < Q_AUDIO_FF_REWIND");
2474 if (!playing) 2473 if (!playing)
2475 break; 2474 break;
2475 if (automatic_skip)
2476 {
2477 /* An automatic track skip is in progress. Finalize it,
2478 then go back to the previous track */
2479 audio_finalise_track_change();
2480 ci.new_track = -1;
2481 }
2476 ci.seek_time = (long)ev.data+1; 2482 ci.seek_time = (long)ev.data+1;
2477 break; 2483 break;
2478 2484