diff options
author | Brandon Low <lostlogic@rockbox.org> | 2006-01-21 23:43:57 +0000 |
---|---|---|
committer | Brandon Low <lostlogic@rockbox.org> | 2006-01-21 23:43:57 +0000 |
commit | 8d5a6609a33f3269bc80975b81e0e859a056d952 (patch) | |
tree | 9bef78c29941956fc6473f58e1657624c150f2d5 /apps/gui/gwps.c | |
parent | 0a9179cb0a4bda8191fcfcb45404ea361fcacdc5 (diff) | |
download | rockbox-8d5a6609a33f3269bc80975b81e0e859a056d952.tar.gz rockbox-8d5a6609a33f3269bc80975b81e0e859a056d952.zip |
AB-repeat mode for software codecs. Accessible through menu as a repeat mode, with buttom mappings much like those on other rockbox targets for now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8409 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/gwps.c')
-rw-r--r-- | apps/gui/gwps.c | 55 |
1 files changed, 47 insertions, 8 deletions
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c index efe207f94a..f75dd80d0f 100644 --- a/apps/gui/gwps.c +++ b/apps/gui/gwps.c | |||
@@ -392,11 +392,17 @@ long gui_wps_show(void) | |||
392 | #ifdef AB_REPEAT_ENABLE | 392 | #ifdef AB_REPEAT_ENABLE |
393 | /* if we're in A/B repeat mode and the current position | 393 | /* if we're in A/B repeat mode and the current position |
394 | is past the A marker, jump back to the A marker... */ | 394 | is past the A marker, jump back to the A marker... */ |
395 | if ( ab_repeat_mode_enabled() | 395 | if ( ab_repeat_mode_enabled() ) |
396 | && ab_after_A_marker(wps_state.id3->elapsed) ) | ||
397 | { | 396 | { |
398 | ab_jump_to_A_marker(); | 397 | if ( ab_after_A_marker(wps_state.id3->elapsed) ) |
399 | break; | 398 | { |
399 | ab_jump_to_A_marker(); | ||
400 | break; | ||
401 | #if (AB_REPEAT_ENABLE == 2) | ||
402 | } else { | ||
403 | ab_reset_markers(); | ||
404 | #endif | ||
405 | } | ||
400 | } | 406 | } |
401 | /* ...otherwise, do it normally */ | 407 | /* ...otherwise, do it normally */ |
402 | #endif | 408 | #endif |
@@ -451,11 +457,17 @@ long gui_wps_show(void) | |||
451 | #ifdef AB_REPEAT_ENABLE | 457 | #ifdef AB_REPEAT_ENABLE |
452 | /* if we're in A/B repeat mode and the current position is | 458 | /* if we're in A/B repeat mode and the current position is |
453 | before the A marker, jump to the A marker... */ | 459 | before the A marker, jump to the A marker... */ |
454 | if ( ab_repeat_mode_enabled() | 460 | if ( ab_repeat_mode_enabled() ) |
455 | && ab_before_A_marker(wps_state.id3->elapsed) ) | ||
456 | { | 461 | { |
457 | ab_jump_to_A_marker(); | 462 | if ( ab_before_A_marker(wps_state.id3->elapsed) ) |
458 | break; | 463 | { |
464 | ab_jump_to_A_marker(); | ||
465 | break; | ||
466 | #if (AB_REPEAT_ENABLE == 2) | ||
467 | } else { | ||
468 | ab_reset_markers(); | ||
469 | #endif | ||
470 | } | ||
459 | } | 471 | } |
460 | /* ...otherwise, do it normally */ | 472 | /* ...otherwise, do it normally */ |
461 | #endif | 473 | #endif |
@@ -545,6 +557,33 @@ long gui_wps_show(void) | |||
545 | 557 | ||
546 | #ifdef AB_REPEAT_ENABLE | 558 | #ifdef AB_REPEAT_ENABLE |
547 | 559 | ||
560 | #ifdef WPS_AB_SINGLE | ||
561 | case WPS_AB_SINGLE: | ||
562 | #ifdef WPS_AB_SINGLE_PRE | ||
563 | if (lastbutton != WPS_AB_SINGLE_PRE) | ||
564 | break; | ||
565 | #endif | ||
566 | /* If we are using the menu option to enable ab_repeat mode, don't do anything | ||
567 | * when it's disabled */ | ||
568 | #if (AB_REPEAT_ENABLE == 1) | ||
569 | if (!ab_repeat_mode_enabled()) | ||
570 | break; | ||
571 | #endif | ||
572 | if (ab_A_marker_set()) { | ||
573 | update_track = true; | ||
574 | if (ab_B_marker_set()) { | ||
575 | ab_reset_markers(); | ||
576 | break; | ||
577 | } | ||
578 | ab_set_B_marker(wps_state.id3->elapsed); | ||
579 | ab_jump_to_A_marker(); | ||
580 | break; | ||
581 | } | ||
582 | ab_set_A_marker(wps_state.id3->elapsed); | ||
583 | break; | ||
584 | #endif | ||
585 | |||
586 | |||
548 | #ifdef WPS_AB_SET_A_MARKER | 587 | #ifdef WPS_AB_SET_A_MARKER |
549 | /* set A marker for A-B repeat */ | 588 | /* set A marker for A-B repeat */ |
550 | case WPS_AB_SET_A_MARKER: | 589 | case WPS_AB_SET_A_MARKER: |