summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/gwps-common.c4
-rw-r--r--apps/gui/gwps.c24
2 files changed, 14 insertions, 14 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index b6a7c89308..0ec89b7140 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -162,9 +162,9 @@ bool update_onvol_change(struct gui_wps * gwps)
162void play_hop(int direction) 162void play_hop(int direction)
163{ 163{
164 if(!wps_state.id3 || !wps_state.id3->length 164 if(!wps_state.id3 || !wps_state.id3->length
165 || global_settings.study_hop_step == 0) 165 || global_settings.skip_length == 0)
166 return; 166 return;
167#define STEP ((unsigned)global_settings.study_hop_step *1000) 167#define STEP ((unsigned)global_settings.skip_length*60*1000)
168 if(direction == 1 168 if(direction == 1
169 && wps_state.id3->length - wps_state.id3->elapsed < STEP+1000) { 169 && wps_state.id3->length - wps_state.id3->elapsed < STEP+1000) {
170#if CONFIG_CODEC == SWCODEC 170#if CONFIG_CODEC == SWCODEC
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c
index c654b3b757..1740e99f9d 100644
--- a/apps/gui/gwps.c
+++ b/apps/gui/gwps.c
@@ -362,11 +362,11 @@ long gui_wps_show(void)
362 break; 362 break;
363 /* fast forward 363 /* fast forward
364 OR next dir if this is straight after ACTION_WPS_SKIPNEXT 364 OR next dir if this is straight after ACTION_WPS_SKIPNEXT
365 OR in study mode, next track if straight after SKIPPREV. */ 365 OR if skip length set, next track if straight after SKIPPREV. */
366 case ACTION_WPS_SEEKFWD: 366 case ACTION_WPS_SEEKFWD:
367 if (global_settings.party_mode) 367 if (global_settings.party_mode)
368 break; 368 break;
369 if (!global_settings.study_mode 369 if (global_settings.skip_length == 0
370 && current_tick -last_right < HZ) 370 && current_tick -last_right < HZ)
371 { 371 {
372 if (cuesheet_is_enabled() && wps_state.id3->cuesheet_type) 372 if (cuesheet_is_enabled() && wps_state.id3->cuesheet_type)
@@ -378,7 +378,7 @@ long gui_wps_show(void)
378 audio_next_dir(); 378 audio_next_dir();
379 } 379 }
380 } 380 }
381 else if(global_settings.study_mode 381 else if (global_settings.skip_length > 0
382 && current_tick -last_left < HZ) { 382 && current_tick -last_left < HZ) {
383 next_track(); 383 next_track();
384 update_track = true; 384 update_track = true;
@@ -388,12 +388,12 @@ long gui_wps_show(void)
388 break; 388 break;
389 /* fast rewind 389 /* fast rewind
390 OR prev dir if this is straight after ACTION_WPS_SKIPPREV, 390 OR prev dir if this is straight after ACTION_WPS_SKIPPREV,
391 OR in study mode, beg of track or prev track if this is 391 OR if skip length set, beg of track or prev track if this is
392 straight after SKIPPREV */ 392 straight after SKIPPREV */
393 case ACTION_WPS_SEEKBACK: 393 case ACTION_WPS_SEEKBACK:
394 if (global_settings.party_mode) 394 if (global_settings.party_mode)
395 break; 395 break;
396 if (!global_settings.study_mode 396 if (global_settings.skip_length == 0
397 && current_tick -last_left < HZ) 397 && current_tick -last_left < HZ)
398 { 398 {
399 if (cuesheet_is_enabled() && wps_state.id3->cuesheet_type) 399 if (cuesheet_is_enabled() && wps_state.id3->cuesheet_type)
@@ -411,10 +411,10 @@ long gui_wps_show(void)
411 audio_prev_dir(); 411 audio_prev_dir();
412 } 412 }
413 } 413 }
414 else if(global_settings.study_mode 414 else if (global_settings.skip_length > 0
415 && current_tick -last_right < HZ) 415 && current_tick -last_right < HZ)
416 { 416 {
417 prev_track(3+global_settings.study_hop_step); 417 prev_track(3+global_settings.skip_length*60);
418 update_track = true; 418 update_track = true;
419 } 419 }
420 else ffwd_rew(ACTION_WPS_SEEKBACK); 420 else ffwd_rew(ACTION_WPS_SEEKBACK);
@@ -446,13 +446,13 @@ long gui_wps_show(void)
446 /* ...otherwise, do it normally */ 446 /* ...otherwise, do it normally */
447#endif 447#endif
448 448
449 if(global_settings.study_mode) 449 if (global_settings.skip_length > 0)
450 play_hop(-1); 450 play_hop(-1);
451 else prev_track(3); 451 else prev_track(3);
452 break; 452 break;
453 453
454 /* next 454 /* next
455 OR in study mode, hop by predetermined amount. */ 455 OR if skip length set, hop by predetermined amount. */
456 case ACTION_WPS_SKIPNEXT: 456 case ACTION_WPS_SKIPNEXT:
457 if (global_settings.party_mode) 457 if (global_settings.party_mode)
458 break; 458 break;
@@ -477,7 +477,7 @@ long gui_wps_show(void)
477 /* ...otherwise, do it normally */ 477 /* ...otherwise, do it normally */
478#endif 478#endif
479 479
480 if(global_settings.study_mode) 480 if (global_settings.skip_length > 0)
481 play_hop(1); 481 play_hop(1);
482 else next_track(); 482 else next_track();
483 break; 483 break;
@@ -496,7 +496,7 @@ long gui_wps_show(void)
496 else 496 else
497#endif 497#endif
498 { 498 {
499 if(global_settings.study_mode) 499 if (global_settings.skip_length > 0)
500 next_track(); 500 next_track();
501 else audio_next_dir(); 501 else audio_next_dir();
502 } 502 }
@@ -510,7 +510,7 @@ long gui_wps_show(void)
510 else 510 else
511#endif 511#endif
512 { 512 {
513 if(global_settings.study_mode) 513 if (global_settings.skip_length > 0)
514 prev_track(3); 514 prev_track(3);
515 else audio_prev_dir(); 515 else audio_prev_dir();
516 } 516 }