diff options
| author | manuel <manuel@mausz.at> | 2011-05-11 17:38:29 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-05-11 17:38:29 +0200 |
| commit | ca29fc0babe8fc985a9e4656f80fc7faec4ac8a5 (patch) | |
| tree | fb48f74ffcddcd8b260ebf78062623427aeda862 /pacman-c++/phononplayer/phononplayer.h | |
| parent | 535c342a2f28e0a1e90010b2f0ff4018eeeb200a (diff) | |
| download | foop-ca29fc0babe8fc985a9e4656f80fc7faec4ac8a5.tar.gz foop-ca29fc0babe8fc985a9e4656f80fc7faec4ac8a5.tar.bz2 foop-ca29fc0babe8fc985a9e4656f80fc7faec4ac8a5.zip | |
- fix audio plugin and make that a real interface
- that fixes a duplicate statis audiomanager (1x pacman, 1x audio plugin) on windows
- display won/lost dialog upon gameend
Diffstat (limited to 'pacman-c++/phononplayer/phononplayer.h')
| -rw-r--r-- | pacman-c++/phononplayer/phononplayer.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/pacman-c++/phononplayer/phononplayer.h b/pacman-c++/phononplayer/phononplayer.h index ca56726..8b9ab06 100644 --- a/pacman-c++/phononplayer/phononplayer.h +++ b/pacman-c++/phononplayer/phononplayer.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #ifndef PHONONPLAYER_H | 1 | #ifndef PHONONPLAYER_H |
| 2 | #define PHONONPLAYER_H | 2 | #define PHONONPLAYER_H |
| 3 | 3 | ||
| 4 | #include "audio.h" | 4 | #include "audiointerface.h" |
| 5 | #include <QObject> | 5 | #include <QObject> |
| 6 | #include <QFile> | 6 | #include <QFile> |
| 7 | #include <QThread> | 7 | #include <QThread> |
| @@ -25,6 +25,7 @@ class PhononPlayer | |||
| 25 | { | 25 | { |
| 26 | Q_OBJECT | 26 | Q_OBJECT |
| 27 | friend class AudioManager; | 27 | friend class AudioManager; |
| 28 | friend class PhononPlayerFactory; | ||
| 28 | 29 | ||
| 29 | private: | 30 | private: |
| 30 | class Sleeper | 31 | class Sleeper |
| @@ -37,14 +38,11 @@ private: | |||
| 37 | }; | 38 | }; |
| 38 | 39 | ||
| 39 | public: | 40 | public: |
| 40 | PhononPlayer(QObject *parent = 0); | ||
| 41 | virtual bool isWorking() const; | 41 | virtual bool isWorking() const; |
| 42 | virtual void setMuted(bool mute = true); | 42 | virtual void setMuted(bool mute = true); |
| 43 | virtual bool isMuted() const; | 43 | virtual bool isMuted() const; |
| 44 | virtual void play(); | 44 | virtual void play(); |
| 45 | virtual void play(Sound::Type sound); | ||
| 46 | virtual bool isPlaying(); | 45 | virtual bool isPlaying(); |
| 47 | virtual void enqueue(Sound::Type sound); | ||
| 48 | virtual void pause(); | 46 | virtual void pause(); |
| 49 | virtual bool isPaused(); | 47 | virtual bool isPaused(); |
| 50 | virtual void stop(); | 48 | virtual void stop(); |
| @@ -52,9 +50,15 @@ public: | |||
| 52 | virtual void clear(); | 50 | virtual void clear(); |
| 53 | virtual void clearQueue(); | 51 | virtual void clearQueue(); |
| 54 | virtual void setPrefinishMark(qint32 msecToEnd); | 52 | virtual void setPrefinishMark(qint32 msecToEnd); |
| 53 | virtual void seek(qint64 time); | ||
| 55 | 54 | ||
| 56 | protected: | 55 | protected: |
| 57 | void test(QFile *testsound, qint32 length); | 56 | PhononPlayer(QObject *parent = 0); |
| 57 | virtual void setWorking(bool working = true); | ||
| 58 | void test(QFile *sound, unsigned int length); | ||
| 59 | virtual void play(QFile *sound, unsigned int length); | ||
| 60 | virtual void setSource(QFile *sound, unsigned int length); | ||
| 61 | virtual void enqueue(QFile *sound, unsigned int length); | ||
| 58 | 62 | ||
| 59 | protected slots: | 63 | protected slots: |
| 60 | virtual void prefinishMarkReached_ex(qint32 mark); | 64 | virtual void prefinishMarkReached_ex(qint32 mark); |
