Index: apps/onplay.c =================================================================== --- apps/onplay.c (revision 24158) +++ apps/onplay.c (working copy) @@ -1027,6 +1027,45 @@ gui_syncpitchscreen_run, NULL, NULL, Icon_Audio); #endif +static bool jump_to_time(void) +{ + char typed_pos[6]=""; + unsigned long pos; + unsigned int i; + if(kbd_input(typed_pos,5)) + return false; + + i=strlen(typed_pos) -1; + for(pos=0; pos<=i; pos++) + if((typed_pos[pos]-=48)>9) + return false; /*string must contain only digits*/ + pos=typed_pos[i]; + if(i>=1) pos+=(typed_pos[i-1] *10); + if(i>=2) pos+=(typed_pos[i-2] *60); + if(i>=3) pos+=(typed_pos[i-3] *600); + if(i==4) pos+=(typed_pos[i-4] *6000); + pos*=1000; /*conversion to miliseconds*/ + if (!(audio_status() & AUDIO_STATUS_PLAY)) + { + return false; + } + else + { +#if (CONFIG_CODEC == SWCODEC) + audio_pre_ff_rewind(); + audio_ff_rewind(pos); +#else + audio_pause(); + audio_ff_rewind(pos); + audio_resume(); +#endif + return true; + } +} + +MENUITEM_FUNCTION(jump_to_time_item, 0, ID2P(LANG_JUMP_TO_TIME), + jump_to_time, NULL, NULL, Icon_NOICON); + /* CONTEXT_[TREE|ID3DB] items */ static int clipboard_callback(int action,const struct menu_item_ex *this_item); MENUITEM_FUNCTION(rename_file_item, 0, ID2P(LANG_RENAME), @@ -1163,7 +1202,7 @@ &rating_item, #endif &bookmark_menu, &browse_id3_item, &list_viewers_item, - &delete_file_item, &view_cue_item, + &delete_file_item, &view_cue_item, &jump_to_time_item, #ifdef HAVE_PITCHSCREEN &pitch_screen_item, #endif Index: apps/lang/english.lang =================================================================== --- apps/lang/english.lang (revision 24158) +++ apps/lang/english.lang (working copy) @@ -13287,3 +13287,17 @@ *: "of" + + id: LANG_JUMP_TO_TIME + desc: Shown in WPS jump to a specified time in a playing track + user: core + + *: "Jump to time" + + + *: "Jump to time" + + + *: "jump to time" + +