diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/playback.c | 6 | ||||
-rw-r--r-- | apps/playlist.c | 18 |
2 files changed, 9 insertions, 15 deletions
diff --git a/apps/playback.c b/apps/playback.c index f698bed024..865d0d724f 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -3687,6 +3687,12 @@ void audio_resume(void) | |||
3687 | audio_queue_send(Q_AUDIO_PAUSE, false); | 3687 | audio_queue_send(Q_AUDIO_PAUSE, false); |
3688 | } | 3688 | } |
3689 | 3689 | ||
3690 | /* Internal function used by REPEAT_ONE */ | ||
3691 | bool audio_pending_track_skip_is_auto(void) | ||
3692 | { | ||
3693 | return (skip_pending == TRACK_SKIP_AUTO); | ||
3694 | } | ||
3695 | |||
3690 | /* Skip the specified number of tracks forward or backward from the current */ | 3696 | /* Skip the specified number of tracks forward or backward from the current */ |
3691 | void audio_skip(int offset) | 3697 | void audio_skip(int offset) |
3692 | { | 3698 | { |
diff --git a/apps/playlist.c b/apps/playlist.c index 673b46c950..7c37333bd8 100644 --- a/apps/playlist.c +++ b/apps/playlist.c | |||
@@ -167,22 +167,11 @@ | |||
167 | #define PLAYLIST_SKIPPED 0x10000000 | 167 | #define PLAYLIST_SKIPPED 0x10000000 |
168 | 168 | ||
169 | static struct playlist_info current_playlist; | 169 | static struct playlist_info current_playlist; |
170 | /* REPEAT_ONE support functions */ | 170 | /* REPEAT_ONE support function from playback.c */ |
171 | static long last_manual_skip_tick = 0; | 171 | extern bool audio_pending_track_skip_is_auto(void); |
172 | |||
173 | static inline bool is_manual_skip(void) | 172 | static inline bool is_manual_skip(void) |
174 | { | 173 | { |
175 | return (last_manual_skip_tick + HZ/2 > current_tick); | 174 | return !audio_pending_track_skip_is_auto(); |
176 | } | ||
177 | |||
178 | static void track_change_callback(unsigned short id, void *param) | ||
179 | { | ||
180 | (void)id; | ||
181 | unsigned int flags = ((struct track_event *)param)->flags; | ||
182 | if ((flags & TEF_AUTO_SKIP) != TEF_AUTO_SKIP) | ||
183 | { | ||
184 | last_manual_skip_tick = current_tick; | ||
185 | } | ||
186 | } | 175 | } |
187 | 176 | ||
188 | /* Directory Cache*/ | 177 | /* Directory Cache*/ |
@@ -1985,7 +1974,6 @@ void playlist_init(void) | |||
1985 | 1974 | ||
1986 | dc_thread_start(¤t_playlist, false); | 1975 | dc_thread_start(¤t_playlist, false); |
1987 | #endif /* HAVE_DIRCACHE */ | 1976 | #endif /* HAVE_DIRCACHE */ |
1988 | add_event(PLAYBACK_EVENT_TRACK_CHANGE, track_change_callback); | ||
1989 | } | 1977 | } |
1990 | 1978 | ||
1991 | /* | 1979 | /* |