diff options
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/wps.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 8b74b0e02b..f8fd99930f 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c | |||
@@ -613,9 +613,9 @@ static long do_wps_exit(long action, bool bookmark) | |||
613 | if (bookmark) | 613 | if (bookmark) |
614 | bookmark_autobookmark(true); | 614 | bookmark_autobookmark(true); |
615 | audio_stop(); | 615 | audio_stop(); |
616 | #ifdef AB_REPEAT_ENABLE | 616 | |
617 | ab_reset_markers(); | 617 | ab_reset_markers(); |
618 | #endif | 618 | |
619 | gwps_leave_wps(true); | 619 | gwps_leave_wps(true); |
620 | #ifdef HAVE_RECORDING | 620 | #ifdef HAVE_RECORDING |
621 | if (action == ACTION_WPS_REC) | 621 | if (action == ACTION_WPS_REC) |
@@ -678,10 +678,9 @@ long gui_wps_show(void) | |||
678 | long last_left = 0, last_right = 0; | 678 | long last_left = 0, last_right = 0; |
679 | struct wps_state *state = get_wps_state(); | 679 | struct wps_state *state = get_wps_state(); |
680 | 680 | ||
681 | #ifdef AB_REPEAT_ENABLE | ||
682 | ab_repeat_init(); | 681 | ab_repeat_init(); |
683 | ab_reset_markers(); | 682 | ab_reset_markers(); |
684 | #endif | 683 | |
685 | wps_state_init(); | 684 | wps_state_init(); |
686 | while ( 1 ) | 685 | while ( 1 ) |
687 | { | 686 | { |
@@ -904,7 +903,7 @@ long gui_wps_show(void) | |||
904 | /* prev / restart */ | 903 | /* prev / restart */ |
905 | case ACTION_WPS_SKIPPREV: | 904 | case ACTION_WPS_SKIPPREV: |
906 | last_left = current_tick; | 905 | last_left = current_tick; |
907 | #ifdef AB_REPEAT_ENABLE | 906 | |
908 | /* if we're in A/B repeat mode and the current position | 907 | /* if we're in A/B repeat mode and the current position |
909 | is past the A marker, jump back to the A marker... */ | 908 | is past the A marker, jump back to the A marker... */ |
910 | if ( ab_repeat_mode_enabled() && ab_after_A_marker(state->id3->elapsed) ) | 909 | if ( ab_repeat_mode_enabled() && ab_after_A_marker(state->id3->elapsed) ) |
@@ -912,9 +911,7 @@ long gui_wps_show(void) | |||
912 | ab_jump_to_A_marker(); | 911 | ab_jump_to_A_marker(); |
913 | break; | 912 | break; |
914 | } | 913 | } |
915 | else | 914 | else /* ...otherwise, do it normally */ |
916 | /* ...otherwise, do it normally */ | ||
917 | #endif | ||
918 | play_hop(-1); | 915 | play_hop(-1); |
919 | break; | 916 | break; |
920 | 917 | ||
@@ -922,7 +919,7 @@ long gui_wps_show(void) | |||
922 | OR if skip length set, hop by predetermined amount. */ | 919 | OR if skip length set, hop by predetermined amount. */ |
923 | case ACTION_WPS_SKIPNEXT: | 920 | case ACTION_WPS_SKIPNEXT: |
924 | last_right = current_tick; | 921 | last_right = current_tick; |
925 | #ifdef AB_REPEAT_ENABLE | 922 | |
926 | /* if we're in A/B repeat mode and the current position is | 923 | /* if we're in A/B repeat mode and the current position is |
927 | before the A marker, jump to the A marker... */ | 924 | before the A marker, jump to the A marker... */ |
928 | if ( ab_repeat_mode_enabled() ) | 925 | if ( ab_repeat_mode_enabled() ) |
@@ -933,32 +930,26 @@ long gui_wps_show(void) | |||
933 | break; | 930 | break; |
934 | } | 931 | } |
935 | } | 932 | } |
936 | else | 933 | else /* ...otherwise, do it normally */ |
937 | /* ...otherwise, do it normally */ | ||
938 | #endif | ||
939 | play_hop(1); | 934 | play_hop(1); |
940 | break; | 935 | break; |
941 | /* next / prev directories */ | 936 | /* next / prev directories */ |
942 | /* and set A-B markers if in a-b mode */ | 937 | /* and set A-B markers if in a-b mode */ |
943 | case ACTION_WPS_ABSETB_NEXTDIR: | 938 | case ACTION_WPS_ABSETB_NEXTDIR: |
944 | #if defined(AB_REPEAT_ENABLE) | ||
945 | if (ab_repeat_mode_enabled()) | 939 | if (ab_repeat_mode_enabled()) |
946 | { | 940 | { |
947 | ab_set_B_marker(state->id3->elapsed); | 941 | ab_set_B_marker(state->id3->elapsed); |
948 | ab_jump_to_A_marker(); | 942 | ab_jump_to_A_marker(); |
949 | } | 943 | } |
950 | else | 944 | else |
951 | #endif | ||
952 | { | 945 | { |
953 | change_dir(1); | 946 | change_dir(1); |
954 | } | 947 | } |
955 | break; | 948 | break; |
956 | case ACTION_WPS_ABSETA_PREVDIR: | 949 | case ACTION_WPS_ABSETA_PREVDIR: |
957 | #if defined(AB_REPEAT_ENABLE) | ||
958 | if (ab_repeat_mode_enabled()) | 950 | if (ab_repeat_mode_enabled()) |
959 | ab_set_A_marker(state->id3->elapsed); | 951 | ab_set_A_marker(state->id3->elapsed); |
960 | else | 952 | else |
961 | #endif | ||
962 | { | 953 | { |
963 | change_dir(-1); | 954 | change_dir(-1); |
964 | } | 955 | } |
@@ -1010,7 +1001,6 @@ long gui_wps_show(void) | |||
1010 | break; | 1001 | break; |
1011 | #endif /* HAVE_PITCHCONTROL */ | 1002 | #endif /* HAVE_PITCHCONTROL */ |
1012 | 1003 | ||
1013 | #ifdef AB_REPEAT_ENABLE | ||
1014 | /* reset A&B markers */ | 1004 | /* reset A&B markers */ |
1015 | case ACTION_WPS_ABRESET: | 1005 | case ACTION_WPS_ABRESET: |
1016 | if (ab_repeat_mode_enabled()) | 1006 | if (ab_repeat_mode_enabled()) |
@@ -1019,7 +1009,6 @@ long gui_wps_show(void) | |||
1019 | update = true; | 1009 | update = true; |
1020 | } | 1010 | } |
1021 | break; | 1011 | break; |
1022 | #endif /* AB_REPEAT_ENABLE */ | ||
1023 | 1012 | ||
1024 | /* stop and exit wps */ | 1013 | /* stop and exit wps */ |
1025 | case ACTION_WPS_STOP: | 1014 | case ACTION_WPS_STOP: |