setShuffleMode()

Set the player's shuffle mode.

Synopsis:

#include <qplayer/qplayer.h>

void setShuffleMode( const PlayerState::ShuffleMode mode );

Arguments:

mode
The new shuffle mode.

Description:

Set the player's shuffle mode. The shuffle mode determines which of two lists the player associated with the QPlayer object uses to select the next track for playback.

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 set the mode 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 setting. By default, the shuffle mode is set to SHUFFLE_OFF.