VizKit
3.3.7
|
Provides access to the state of the audio player host. More...
#include <VisualPlayerState.h>
Public Member Functions | |
bool | isAudioPlaying (void) const |
Answers the question whether currently audio is playing. | |
AudioPlayState | getAudioPlayState (void) const |
Returns the play state of the visual player. | |
PlayerShowMode | getPlayerShowMode (void) const |
Returns the current mode of the show state. | |
uint32 | getElapsedAudioTime (void) const |
Returns the number of milliseconds of the current audio track that have been passed. | |
bool | remainingAudioTimeIsKnown (void) const |
Answers the question whether the remaining time of the current audio track is known. | |
uint32 | getRemainingAudioTime (void) const |
Returns the number of milliseconds of the current audio track that are waiting to be played. | |
bool | fadeOutEventShouldBeSent (void) |
Returns true if the fadeOut event should be sent because the remaining time is less than kAudioPlayReachedFadeOutTimeEvt. | |
uint32 | getElapsedAudioPlayStartTime (void) const |
Returns the actual number of milliseconds that have passed since the last audio play start event. | |
uint32 | getElapsedAudioPlayStopTime (void) const |
Returns the actual number of milliseconds that have passed since the last audio play stop event. | |
bool | isInDebugMode (void) const |
Returns true if player is in debug mode, false otherwise. | |
void | setAudioPlayState (const AudioPlayState playState) |
Stores the state of audio play. | |
void | setPlayerShowMode (const PlayerShowMode aShowMode) |
Stores the current mode of the show state. | |
void | setDebugMode (bool requestedDebugMode) |
Sets the debug mode. | |
void | setTrackPlayPositionInMS (const uint32 positionInMS) |
The play position of the current track is set. | |
Static Public Member Functions | |
static VisualPlayerState * | getInstance (void) |
Constructs a VisualPlayerState. | |
static void | dispose (void) |
Disposes the VisualPlayerState. | |
static void | convertAudioPlayStateToString (const AudioPlayState anAudioPlayState, char *outString) |
Static helper function that converts an audioPlayState to the string. | |
static void | convertPlayerShowModeToString (const PlayerShowMode aShowMode, char *outString) |
Static helper function that converts an showMode to the string. | |
Private Member Functions | |
VisualPlayerState () | |
The constructor. | |
~VisualPlayerState () | |
The destructor. | |
VisualPlayerState (const VisualPlayerState &other) | |
Copy constructor. | |
VisualPlayerState & | operator= (const VisualPlayerState &other) |
Assignment operator. | |
Private Attributes | |
AudioPlayState | audioPlayState |
Uses enum audioPlayState to store the state of audio play. | |
PlayerShowMode | showMode |
Uses enum showMode to store the show mode. | |
bool | fadeOutEventHasBeenSent |
Stores whether the fadeOut event has been sent once during the play of the current audio track. | |
uint32 | trackPlayPositionInMS |
The current play position of the current track (in milliseconds). | |
bool | debugMode |
True if player is in debug mode, false otherwise. | |
Static Private Attributes | |
static VisualPlayerState * | theVisualPlayerState = NULL |
VisualPlayerState is a singleton class. |
Provides access to the state of the audio player host.
VisualPlayerState::VisualPlayerState | ( | ) | [private] |
The constructor.
VisualPlayerState is a singleton class. The constructor is private. New instance of class can only be created internally.
VisualPlayerState::~VisualPlayerState | ( | ) | [private] |
The destructor.
VisualPlayerState is a singleton class. The destructor is private. Instance of class can only be destructed internally.
VizKit::VisualPlayerState::VisualPlayerState | ( | const VisualPlayerState & | other | ) | [private] |
Copy constructor.
other | Another VisualPlayerState. |
void VisualPlayerState::convertAudioPlayStateToString | ( | const AudioPlayState | anAudioPlayState, |
char * | outString | ||
) | [static] |
Static helper function that converts an audioPlayState to the string.
Possibly useful for debugging or tracing purposes.
anAudioPlayState | An audioPlayState. |
outString | The character string value of the AudioPlayState enum value. |
void VisualPlayerState::convertPlayerShowModeToString | ( | const PlayerShowMode | aShowMode, |
char * | outString | ||
) | [static] |
Static helper function that converts an showMode to the string.
Possibly useful for debugging or tracing purposes.
aShowMode | A showMode. |
outString | The character string value of the ShowMode enum value. |
void VisualPlayerState::dispose | ( | void | ) | [static] |
Disposes the VisualPlayerState.
bool VisualPlayerState::fadeOutEventShouldBeSent | ( | void | ) |
Returns true if the fadeOut event should be sent because the remaining time is less than kAudioPlayReachedFadeOutTimeEvt.
AudioPlayState VisualPlayerState::getAudioPlayState | ( | void | ) | const |
Returns the play state of the visual player.
uint32 VisualPlayerState::getElapsedAudioPlayStartTime | ( | void | ) | const |
Returns the actual number of milliseconds that have passed since the last audio play start event.
AudioPlayStartTime and audioPlayStopTime are mutual exclusive. If audioPlayStartTime > 0 then audio is playing and audioPlayStopTime == 0. If audioPlayStopTime > 0 then audio is not playing and audioPlayStartTime == 0.
uint32 VisualPlayerState::getElapsedAudioPlayStopTime | ( | void | ) | const |
Returns the actual number of milliseconds that have passed since the last audio play stop event.
AudioPlayStartTime and audioPlayStopTime are mutual exclusive. If audioPlayStartTime > 0 then audio is playing and audioPlayStopTime == 0. If audioPlayStopTime > 0 then audio is not playing and audioPlayStartTime == 0.
uint32 VisualPlayerState::getElapsedAudioTime | ( | void | ) | const |
Returns the number of milliseconds of the current audio track that have been passed.
0 if no time value is available. The player position is returned.
VisualPlayerState * VisualPlayerState::getInstance | ( | void | ) | [static] |
Constructs a VisualPlayerState.
The VisualPlayerState acts as a singleton. Returns a pointer to the initialised VisualPlayerState.
PlayerShowMode VisualPlayerState::getPlayerShowMode | ( | void | ) | const |
Returns the current mode of the show state.
uint32 VisualPlayerState::getRemainingAudioTime | ( | void | ) | const |
Returns the number of milliseconds of the current audio track that are waiting to be played.
0 if no time value is available.
bool VisualPlayerState::isAudioPlaying | ( | void | ) | const |
Answers the question whether currently audio is playing.
bool VisualPlayerState::isInDebugMode | ( | void | ) | const |
Returns true if player is in debug mode, false otherwise.
Useful for temporarily and dynamically activated debug mode that can be checked against in different places.
VisualPlayerState& VizKit::VisualPlayerState::operator= | ( | const VisualPlayerState & | other | ) | [private] |
Assignment operator.
bool VisualPlayerState::remainingAudioTimeIsKnown | ( | void | ) | const |
Answers the question whether the remaining time of the current audio track is known.
Streamed audio has no info about remaining time of current track.
void VisualPlayerState::setAudioPlayState | ( | const AudioPlayState | playState | ) |
Stores the state of audio play.
playState | A value of audioPlayState enum. |
void VisualPlayerState::setDebugMode | ( | bool | requestedDebugMode | ) |
Sets the debug mode.
requestedDebugMode | The debug mode. True turns debug mode on, false turns it off. |
void VisualPlayerState::setPlayerShowMode | ( | const PlayerShowMode | aShowMode | ) |
Stores the current mode of the show state.
aShowMode | The current mode of the show state. |
void VisualPlayerState::setTrackPlayPositionInMS | ( | const uint32 | positionInMS | ) |
The play position of the current track is set.
positionInMS | The play position in milliseconds. |
Uses enum audioPlayState to store the state of audio play.
See enum audioPlayState for possible different states of audio play.
bool VizKit::VisualPlayerState::debugMode [private] |
True if player is in debug mode, false otherwise.
bool VizKit::VisualPlayerState::fadeOutEventHasBeenSent [private] |
Stores whether the fadeOut event has been sent once during the play of the current audio track.
Uses enum showMode to store the show mode.
See enum showMode for possible different show modes.
VisualPlayerState * VisualPlayerState::theVisualPlayerState = NULL [static, private] |
VisualPlayerState is a singleton class.
Pointer to private instance is handled internally.
The current play position of the current track (in milliseconds).