Set a new playlist.
int mmr_list_change( mmr_context_t *ctxt, const char *url, int delta )
- A context handle.
- The URL of a new playlist.
- The difference between the position of the current track on the two lists.
Set a new playlist without interrupting playback. This function can be used only during playback of a playlist (including when it's paused, but not stopped). The new playlist must contain the currently playing track at position n+delta, where n is its position on the old playlist. Note that delta is a signed value, so it can be negative.
Zero on success, -1 on failure (use mmr_error_info().
Common errors returned by this function and recommended follow-up actions are:
- The context was stopped, not playing. The playback might have reached the end of the old playlist and so it was too late to switch playlists without interrupting playback. To fix, attach the new playlist as an input, seek to the beginning of the appropriate track, and start playback.
- The location in the new list you indicated (n + delta) is out of range or refers to a different URL. This error could be caused by a stale delta value, which results when the track you thought was playing just ended and a different track is playing now. To fix, recompute the difference between the position of the current track on the two lists.