PlayerState

Stores playback status properties.

Synopsis:

#include <qplayer/types.h>

class PlayerState {

public:
    enum PlayerStatus {
        DESTROYED,
        IDLE,
        PLAYING,
        PAUSED,
        STOPPED
    };

    enum RepeatMode {
        QP_REPEAT_OFF,
        QP_REPEAT_ALL,
        QP_REPEAT_ONE
    };

    enum ShuffleMode {
        QP_SHUFFLE_OFF,
        QP_SHUFFLE_ON
    };

    ShuffleMode shuffle;
    RepeatMode repeat;
    PlayerStatus status;
    float rate;
} ;

Data:

ShuffleMode shuffle
Shuffle mode. Can be one of:
SHUFFLE_OFF
Shuffling is off; tracks will be played sequentially.
SHUFFLE_ON
Shuffling is on; tracks will be played in a random order.
RepeatMode repeat
Repeat mode. Can be one of:
REPEAT_OFF
No tracks will be repeated (playback will stop when the end of the active tracksession is reached).
REPEAT_ALL
All tracks will be repeated in the same order (playback will loop).
REPEAT_ONE
The current track will be continuously repeated.
PlayerStatus status
The player's status, which reflects its current playback support and activity. Can be one of the following:
STATUS_DESTROYED
Reserved for future use.
STATUS_IDLE
The player is created but no tracksession is defined so playback is currently not possible.
STATUS_PLAYING
A track is currently playing.
STATUS_PAUSED
Playback is paused.
STATUS_STOPPED
Playback is stopped, no track is selected, or an error has occurred.
float rate
Playback rate (i.e., the speed of playback).

Library:

libqplayer

Description:

Stores playback status properties. This class defines enumerations that specify the possible settings for a player's status and its repeat and shuffle modes. When examining the fields that store these settings in a PlayerState object, your code can compare the field values to specific enumeration constants, making it more readable.