Thank You for your continued support and contributions!
/* Skip the specified number of tracks forward or backward from the current */void audio_skip(int offset){ /* If offset has to be backed-out to stay in range, no skip is done */ int accum = skip_offset + offset; while (offset != 0 && !playlist_check(accum)) { offset += offset < 0 ? 1 : -1; accum = skip_offset + offset; } if (offset != 0) { ... } else { /* No more tracks */ }
if (global_settings.repeat_mode == REPEAT_ONE) { global_settings.repeat_mode = REPEAT_OFF; [skip track]; global_settings.repeat_mode = REPEAT_ONE;}
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
/* 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); }}
Page created in 0.115 seconds with 14 queries.