diff options
-rw-r--r-- | apps/abrepeat.c | 17 | ||||
-rw-r--r-- | apps/abrepeat.h | 2 | ||||
-rw-r--r-- | apps/gui/wps.c | 1 |
3 files changed, 9 insertions, 11 deletions
diff --git a/apps/abrepeat.c b/apps/abrepeat.c index 19e9450c99..886564aaa5 100644 --- a/apps/abrepeat.c +++ b/apps/abrepeat.c | |||
@@ -47,6 +47,7 @@ void ab_end_of_track_report(void) | |||
47 | } | 47 | } |
48 | } | 48 | } |
49 | 49 | ||
50 | #if 0 | ||
50 | void ab_repeat_init(void) | 51 | void ab_repeat_init(void) |
51 | { | 52 | { |
52 | static bool ab_initialized = false; | 53 | static bool ab_initialized = false; |
@@ -55,13 +56,13 @@ void ab_repeat_init(void) | |||
55 | ab_initialized = true; | 56 | ab_initialized = true; |
56 | } | 57 | } |
57 | } | 58 | } |
59 | #endif | ||
58 | 60 | ||
59 | /* determines if the given song position is earlier than the A mark; | 61 | /* determines if the given song position is earlier than the A mark; |
60 | intended for use in handling the jump NEXT and PREV commands */ | 62 | intended for use in handling the jump NEXT and PREV commands */ |
61 | bool ab_before_A_marker(unsigned int song_position) | 63 | bool ab_before_A_marker(unsigned int song_position) |
62 | { | 64 | { |
63 | return (ab_A_marker != AB_MARKER_NONE) | 65 | return (song_position < ab_A_marker); |
64 | && (song_position < ab_A_marker); | ||
65 | } | 66 | } |
66 | 67 | ||
67 | /* determines if the given song position is later than the A mark; | 68 | /* determines if the given song position is later than the A mark; |
@@ -97,20 +98,20 @@ by this fudge factor when setting a mark */ | |||
97 | void ab_set_A_marker(unsigned int song_position) | 98 | void ab_set_A_marker(unsigned int song_position) |
98 | { | 99 | { |
99 | ab_A_marker = song_position; | 100 | ab_A_marker = song_position; |
100 | ab_A_marker = (ab_A_marker >= EAR_TO_HAND_LATENCY_FUDGE) | 101 | ab_A_marker = (ab_A_marker >= EAR_TO_HAND_LATENCY_FUDGE) |
101 | ? (ab_A_marker - EAR_TO_HAND_LATENCY_FUDGE) : 0; | 102 | ? (ab_A_marker - EAR_TO_HAND_LATENCY_FUDGE) : AB_MARKER_NONE; |
102 | /* check if markers are out of order */ | 103 | /* check if markers are out of order */ |
103 | if ( (ab_B_marker != AB_MARKER_NONE) && (ab_A_marker > ab_B_marker) ) | 104 | if (ab_A_marker > ab_B_marker) |
104 | ab_B_marker = AB_MARKER_NONE; | 105 | ab_B_marker = AB_MARKER_NONE; |
105 | } | 106 | } |
106 | 107 | ||
107 | void ab_set_B_marker(unsigned int song_position) | 108 | void ab_set_B_marker(unsigned int song_position) |
108 | { | 109 | { |
109 | ab_B_marker = song_position; | 110 | ab_B_marker = song_position; |
110 | ab_B_marker = (ab_B_marker >= EAR_TO_HAND_LATENCY_FUDGE) | 111 | ab_B_marker = (ab_B_marker >= EAR_TO_HAND_LATENCY_FUDGE) |
111 | ? (ab_B_marker - EAR_TO_HAND_LATENCY_FUDGE) : 0; | 112 | ? (ab_B_marker - EAR_TO_HAND_LATENCY_FUDGE) : AB_MARKER_NONE; |
112 | /* check if markers are out of order */ | 113 | /* check if markers are out of order */ |
113 | if ( (ab_A_marker != AB_MARKER_NONE) && (ab_B_marker < ab_A_marker) ) | 114 | if (ab_B_marker < ab_A_marker) |
114 | ab_A_marker = AB_MARKER_NONE; | 115 | ab_A_marker = AB_MARKER_NONE; |
115 | } | 116 | } |
116 | 117 | ||
diff --git a/apps/abrepeat.h b/apps/abrepeat.h index 4d2c4ea001..1542b24f47 100644 --- a/apps/abrepeat.h +++ b/apps/abrepeat.h | |||
@@ -38,7 +38,6 @@ static inline void ab_void_dummy_marker(unsigned int song_position) | |||
38 | } | 38 | } |
39 | static inline void ab_dummy_voidfn(void){} | 39 | static inline void ab_dummy_voidfn(void){} |
40 | 40 | ||
41 | #define ab_repeat_init ab_dummy_voidfn | ||
42 | #define ab_before_A_marker ab_bool_dummy_marker | 41 | #define ab_before_A_marker ab_bool_dummy_marker |
43 | #define ab_after_A_marker ab_bool_dummy_marker | 42 | #define ab_after_A_marker ab_bool_dummy_marker |
44 | #define ab_jump_to_A_marker ab_dummy_voidfn | 43 | #define ab_jump_to_A_marker ab_dummy_voidfn |
@@ -59,7 +58,6 @@ static inline void ab_dummy_voidfn(void){} | |||
59 | 58 | ||
60 | #include "settings.h" | 59 | #include "settings.h" |
61 | 60 | ||
62 | void ab_repeat_init(void); | ||
63 | bool ab_before_A_marker(unsigned int song_position); | 61 | bool ab_before_A_marker(unsigned int song_position); |
64 | bool ab_after_A_marker(unsigned int song_position); | 62 | bool ab_after_A_marker(unsigned int song_position); |
65 | void ab_jump_to_A_marker(void); | 63 | void ab_jump_to_A_marker(void); |
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 260730c4a1..0de805bd02 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c | |||
@@ -692,7 +692,6 @@ long gui_wps_show(void) | |||
692 | long last_left = 0, last_right = 0; | 692 | long last_left = 0, last_right = 0; |
693 | struct wps_state *state = get_wps_state(); | 693 | struct wps_state *state = get_wps_state(); |
694 | 694 | ||
695 | ab_repeat_init(); | ||
696 | ab_reset_markers(); | 695 | ab_reset_markers(); |
697 | 696 | ||
698 | wps_state_init(); | 697 | wps_state_init(); |