From ca29fc0babe8fc985a9e4656f80fc7faec4ac8a5 Mon Sep 17 00:00:00 2001 From: manuel Date: Wed, 11 May 2011 17:38:29 +0200 Subject: - 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 --- pacman-c++/phononplayer/phononplayer.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'pacman-c++/phononplayer/phononplayer.h') 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 @@ #ifndef PHONONPLAYER_H #define PHONONPLAYER_H -#include "audio.h" +#include "audiointerface.h" #include #include #include @@ -25,6 +25,7 @@ class PhononPlayer { Q_OBJECT friend class AudioManager; + friend class PhononPlayerFactory; private: class Sleeper @@ -37,14 +38,11 @@ private: }; public: - PhononPlayer(QObject *parent = 0); virtual bool isWorking() const; virtual void setMuted(bool mute = true); virtual bool isMuted() const; virtual void play(); - virtual void play(Sound::Type sound); virtual bool isPlaying(); - virtual void enqueue(Sound::Type sound); virtual void pause(); virtual bool isPaused(); virtual void stop(); @@ -52,9 +50,15 @@ public: virtual void clear(); virtual void clearQueue(); virtual void setPrefinishMark(qint32 msecToEnd); + virtual void seek(qint64 time); protected: - void test(QFile *testsound, qint32 length); + PhononPlayer(QObject *parent = 0); + virtual void setWorking(bool working = true); + void test(QFile *sound, unsigned int length); + virtual void play(QFile *sound, unsigned int length); + virtual void setSource(QFile *sound, unsigned int length); + virtual void enqueue(QFile *sound, unsigned int length); protected slots: virtual void prefinishMarkReached_ex(qint32 mark); -- cgit v1.2.3