summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2013-07-14 07:59:39 -0400
committerMichael Sevakis <jethead71@rockbox.org>2014-03-10 04:12:30 +0100
commit31b712286721dd606940c7b557d03e3f714b9604 (patch)
tree8c4a4cc32e9000ea721ebb23aa3c0129ca97bf53 /apps/plugins
parentdda54b85daa83b7803b4fb189ab45859f96ff3f9 (diff)
downloadrockbox-31b712286721dd606940c7b557d03e3f714b9604.tar.gz
rockbox-31b712286721dd606940c7b557d03e3f714b9604.zip
Implement time-based resume and playback start.
This complements offset-based resume and playback start funcionality. The implementation is global on both HWCODEC and SWCODEC. Basically, if either the specified elapsed or offset are non-zero, it indicates a mid-track resume. To resume by time only, set elapsed to nonzero and offset to zero. To resume by offset only, set offset to nonzero and elapsed to zero. Which one the codec uses and which has priority is up to the codec; however, using an elapsed time covers more cases: * Codecs not able to use an offset such as VGM or other atomic formats * Starting playback at a nonzero elapsed time from a source that contains no offset, such as a cuesheet The change re-versions pretty much everything from tagcache to nvram. Change-Id: Ic7aebb24e99a03ae99585c5e236eba960d163f38 Reviewed-on: http://gerrit.rockbox.org/516 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested: Michael Sevakis <jethead71@rockbox.org>
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/alarmclock.c1
-rw-r--r--apps/plugins/alpine_cdc.c4
-rw-r--r--apps/plugins/lib/playback_control.c1
-rw-r--r--apps/plugins/lrcplayer.c1
-rw-r--r--apps/plugins/pictureflow/pictureflow.c2
-rw-r--r--apps/plugins/random_folder_advance_config.c2
6 files changed, 7 insertions, 4 deletions
diff --git a/apps/plugins/alarmclock.c b/apps/plugins/alarmclock.c
index 79a676003a..ecafceddc7 100644
--- a/apps/plugins/alarmclock.c
+++ b/apps/plugins/alarmclock.c
@@ -109,6 +109,7 @@ static void resume_audio(void)
109 if (rb->playlist_resume() != -1) { 109 if (rb->playlist_resume() != -1) {
110 rb->playlist_resume_track(rb->global_status->resume_index, 110 rb->playlist_resume_track(rb->global_status->resume_index,
111 rb->global_status->resume_crc32, 111 rb->global_status->resume_crc32,
112 rb->global_status->resume_elapsed,
112 rb->global_status->resume_offset); 113 rb->global_status->resume_offset);
113 } 114 }
114 } 115 }
diff --git a/apps/plugins/alpine_cdc.c b/apps/plugins/alpine_cdc.c
index 653c968ffa..28bb8d8b7f 100644
--- a/apps/plugins/alpine_cdc.c
+++ b/apps/plugins/alpine_cdc.c
@@ -997,8 +997,8 @@ void set_play(void)
997 } 997 }
998 else 998 else
999 { 999 {
1000 print_scroll("audio_play(0)"); 1000 print_scroll("audio_play(0, 0)");
1001 rb->audio_play(0); 1001 rb->audio_play(0, 0);
1002 } 1002 }
1003} 1003}
1004 1004
diff --git a/apps/plugins/lib/playback_control.c b/apps/plugins/lib/playback_control.c
index 47921e52f2..1be234f70f 100644
--- a/apps/plugins/lib/playback_control.c
+++ b/apps/plugins/lib/playback_control.c
@@ -39,6 +39,7 @@ static bool play(void)
39 { 39 {
40 rb->playlist_resume_track(rb->global_status->resume_index, 40 rb->playlist_resume_track(rb->global_status->resume_index,
41 rb->global_status->resume_crc32, 41 rb->global_status->resume_crc32,
42 rb->global_status->resume_elapsed,
42 rb->global_status->resume_offset); 43 rb->global_status->resume_offset);
43 } 44 }
44 } 45 }
diff --git a/apps/plugins/lrcplayer.c b/apps/plugins/lrcplayer.c
index 6e0394fa51..392e78e77f 100644
--- a/apps/plugins/lrcplayer.c
+++ b/apps/plugins/lrcplayer.c
@@ -2684,6 +2684,7 @@ static int handle_button(void)
2684 { 2684 {
2685 rb->playlist_resume_track(rb->global_status->resume_index, 2685 rb->playlist_resume_track(rb->global_status->resume_index,
2686 rb->global_status->resume_crc32, 2686 rb->global_status->resume_crc32,
2687 rb->global_status->resume_elapsed,
2687 rb->global_status->resume_offset); 2688 rb->global_status->resume_offset);
2688 } 2689 }
2689 } 2690 }
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c
index 51fe5ebfc5..bb7cec888f 100644
--- a/apps/plugins/pictureflow/pictureflow.c
+++ b/apps/plugins/pictureflow/pictureflow.c
@@ -2580,7 +2580,7 @@ play:
2580 * if shuffle, we can't predict the playing track easily, and for either 2580 * if shuffle, we can't predict the playing track easily, and for either
2581 * case the track list doesn't get auto scrolled*/ 2581 * case the track list doesn't get auto scrolled*/
2582 if(!append) 2582 if(!append)
2583 rb->playlist_start(position, 0); 2583 rb->playlist_start(position, 0, 0);
2584 old_playlist = center_slide.slide_index; 2584 old_playlist = center_slide.slide_index;
2585 old_shuffle = shuffle; 2585 old_shuffle = shuffle;
2586} 2586}
diff --git a/apps/plugins/random_folder_advance_config.c b/apps/plugins/random_folder_advance_config.c
index 7f6018df4e..0b3532dde0 100644
--- a/apps/plugins/random_folder_advance_config.c
+++ b/apps/plugins/random_folder_advance_config.c
@@ -541,7 +541,7 @@ static int start_shuffled_play(void)
541 } 541 }
542 } 542 }
543 rb->splash(HZ, "Done"); 543 rb->splash(HZ, "Done");
544 rb->playlist_start(0,0); 544 rb->playlist_start(0, 0, 0);
545 return 1; 545 return 1;
546} 546}
547 547