1
0
Fork 0
forked from len0rd/rockbox

[RFC] REPEAT_ONE manual track skip

I recently added track skipping while REPEAT_ONE was set

currently by registering a track skip callback
I'm not entirely happy with the additional constant overhead
of the event callback

Instead I went looking for a way to distinguish
a pending track skip from some limited testing
it appears to work just as well to compare
playback's skip_pending == TRACK_SKIP_AUTO
but the lack of lifetime control worries me slightly

Change-Id: Ic71b4c3925e991f5a1216d16ecd3af6cc777ef1e
This commit is contained in:
William Wilgus 2023-09-19 08:15:07 -04:00 committed by William Wilgus
parent 3dbf5a97ad
commit e01055a287
2 changed files with 9 additions and 15 deletions

View file

@ -3687,6 +3687,12 @@ void audio_resume(void)
audio_queue_send(Q_AUDIO_PAUSE, false);
}
/* Internal function used by REPEAT_ONE */
bool audio_pending_track_skip_is_auto(void)
{
return (skip_pending == TRACK_SKIP_AUTO);
}
/* Skip the specified number of tracks forward or backward from the current */
void audio_skip(int offset)
{