19 #ifndef AUDIOMANAGER_H
20 #define AUDIOMANAGER_H
23 #include <QMediaPlayer>
24 #include <QSoundEffect>
25 #include <QMediaPlaylist>
117 #endif // AUDIOMANAGER_H
It is a semi-thread class to manage the audio of Qubet. It can manage an ambientMusic and different e...
Definition: audiomanager.h:37
bool audioEnabled
Definition: audiomanager.h:67
void stopAmbientMusic()
Stops the current ambient music.
Definition: audiomanager.cpp:110
~AudioManager()
Safely stops and destroys the AudioManager (including the ambientMusic and all the effects in the eff...
Definition: audiomanager.cpp:49
void playEffect(QString effectName)
Plays the effect that has got the parameter effectName filename.
Definition: audiomanager.cpp:115
QMap< QString, QSoundEffect * > effectsList
Definition: audiomanager.h:70
bool isAudioEnabled()
Returns the state of the audio.
Definition: audiomanager.cpp:72
QMediaPlayer * ambientMusic
Definition: audiomanager.h:68
QObject * parent
Definition: audiomanager.h:66
void run()
It is the reimplementation of QThread's run() method. It is empty because the AudioManager is a semi-...
Definition: audiomanager.cpp:129
void playAmbientMusic(QString filename)
Plays the music file provided as parameter filename as ambientMusic.
Definition: audiomanager.cpp:97
void enableAudio(bool enabled)
Sets the variable audioEnabled and pause or continue the ambientMusic. If enabled is false and there ...
Definition: audiomanager.cpp:77
AudioManager(QObject *_parent=0)
Creates a new AudioManager loading all the effects in the folder resources/effects.
Definition: audiomanager.cpp:23
QMediaPlaylist * playlist
Definition: audiomanager.h:69