Support and General Use > Audio Playback, Database and Playlists
Sansa Clip+ can Rockbox repeat current track but allow skip to next track button
saratoga:
--- Quote from: adw on October 26, 2012, 03:19:57 PM ---Instead of finding the next track and replacing the old track by the new track in the single-item playlist, would it be an option to
--- End quote ---
I have no idea.
adw:
I have tried it out, didn't work, same behavior as before. I have even stolen "settings_save" and "audio_flush_and_reload_tracks" from another file where "global_settings.repeat_mode" was changed, but that didn't help either. Obviously I'm lacking basics of playlist control.
apps/playback.c:
--- Code: ---/* Skip one track forward from the current */
void audio_next(void)
{
if (global_settings.repeat_mode == REPEAT_ONE) {
/* repeat current track but allow skip to next track button */
global_settings.repeat_mode = REPEAT_OFF;
settings_save();
if (audio_status() & AUDIO_STATUS_PLAY) audio_flush_and_reload_tracks();
audio_skip(1);
global_settings.repeat_mode = REPEAT_ONE;
settings_save();
if (audio_status() & AUDIO_STATUS_PLAY) audio_flush_and_reload_tracks();
} else {
audio_skip(1);
}
}
/* Skip one track backward from the current */
void audio_prev(void)
{
if (global_settings.repeat_mode == REPEAT_ONE) {
/* repeat current track but allow skip to next track button */
global_settings.repeat_mode = REPEAT_OFF;
settings_save();
if (audio_status() & AUDIO_STATUS_PLAY) audio_flush_and_reload_tracks();
audio_skip(-1);
global_settings.repeat_mode = REPEAT_ONE;
settings_save();
if (audio_status() & AUDIO_STATUS_PLAY) audio_flush_and_reload_tracks();
} else {
audio_skip(-1);
}
}
--- End code ---
Probably "audio_flush_and_reload_tracks" is not the correct function to re-build the playlist, required to skip to the next track. Any clue?
Post Merge: October 29, 2012, 02:21:58 PMSorry, "same behavior as before" wasn't correct. For a fraction of a second I can see the next title on the display, so I assume the skipping is correct, but then I fall back into the old single-track playlist.
adw:
I'm lost. Does anyone have a hint for me? Thanks!
Looted:
I'm also in dire need of that function, did anyone have any success implementing it?
Navigation
[0] Message Index
[*] Previous page
Go to full version