summaryrefslogtreecommitdiffstats
path: root/pacman-c++/audioplayer.h
diff options
context:
space:
mode:
Diffstat (limited to 'pacman-c++/audioplayer.h')
-rw-r--r--pacman-c++/audioplayer.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/pacman-c++/audioplayer.h b/pacman-c++/audioplayer.h
new file mode 100644
index 0000000..3dc3cfd
--- /dev/null
+++ b/pacman-c++/audioplayer.h
@@ -0,0 +1,38 @@
1#ifndef AUDIOPLAYER_H
2#define AUDIOPLAYER_H
3
4#include <QObject>
5#include <phonon/phononnamespace.h>
6
7namespace Phonon
8{
9 class MediaObject;
10 class AudioOutput;
11}
12
13class AudioPlayer
14 : public QObject
15{
16 Q_OBJECT
17
18public:
19 AudioPlayer();
20 static AudioPlayer *self();
21 void stop();
22 void setMuted(bool mute = true);
23 void playIntro();
24
25signals:
26 void finished();
27
28private slots:
29 void finished_p();
30 void stateChanged_p(Phonon::State newstate, Phonon::State oldstate);
31
32private:
33 Phonon::MediaObject *m_player;
34 Phonon::AudioOutput *m_output;
35 static AudioPlayer *m_instance;
36};
37
38#endif // AUDIOPLAYER_H