Stellarium  0.18.3
Public Slots
StelAudioMgr Class Reference

Public Slots

void loadSound (const QString &filename, const QString &id)
 Load sound file to be accessed under ID. More...
 
void playSound (const QString &id)
 Play sound with id previously loaded with loadSound. More...
 
void pauseSound (const QString &id)
 Pauses replay of sound id. Prints warning to logfile if id not found.
 
void stopSound (const QString &id)
 Stops replay of sound id. Prints warning to logfile if id not found.
 
void dropSound (const QString &id)
 remove audio object from memory. Prints warning to logfile if id not found.
 
qint64 position (const QString &id)
 report position (in ms) in running audio track id, or -1 if this is not possible.
 
qint64 duration (const QString &id)
 report duration (in ms) in running audio track id, 0 if unknown (before playback starts!), or -1 if this is not possible. More...
 

Member Function Documentation

◆ duration

qint64 StelAudioMgr::duration ( const QString &  id)
slot
Note
duration may only be detected after playback has started! Call it a second after that.

◆ loadSound

void StelAudioMgr::loadSound ( const QString &  filename,
const QString &  id 
)
slot

If id has been defined already, replace the old sound object.

◆ playSound

void StelAudioMgr::playSound ( const QString &  id)
slot

Prints warning to logfile if id not found. If sound is already playing, restart it. If sound had been paused previously, continue replay.