Set the shuffle mode.


#include <mmplayer/mmplayerclient.h>
int mm_player_shuffle( mmplayer_hdl_t *hdl, 
                       const shuffle_e mode )


The mm-player connection handle
The new shuffle mode setting




Set the shuffle mode. This function lets you enable and disable randomized playback.

The shuffle mode setting determines which of two lists the player uses to select a new track for playback when the current track finishes playing. When the mode is SHUFFLE_ON, the player uses a randomized track list, which indexes tracks in an order different from their order in the media source. For example, when the track listed as number 2 on its album finishes playing, the next track played could be any other track on the album (including the track listed as number 3). When the mode is SHUFFLE_OFF, the player uses the sequential track list, which reflects the track order in the media source. In this case, when track number 2 finishes playing, track number 3 will play next.

When you call this function with mode set to SHUFFLE_ON, the player generates a new randomized playback list. So you can keep randomized playback enabled and just change to a different random order by calling this function multiple times with this mode setting.

By default, shuffling is disabled, meaning the shuffle mode is SHUFFLE_OFF when a player is created.


0 on success, -1 on failure