diff options
Diffstat (limited to 'pacman-c++')
| -rw-r--r-- | pacman-c++/audioplayer.cpp | 6 | ||||
| -rw-r--r-- | pacman-c++/audioplayer.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/pacman-c++/audioplayer.cpp b/pacman-c++/audioplayer.cpp index 32988e6..15a29ca 100644 --- a/pacman-c++/audioplayer.cpp +++ b/pacman-c++/audioplayer.cpp | |||
| @@ -36,6 +36,7 @@ AudioPlayer::AudioPlayer() | |||
| 36 | { | 36 | { |
| 37 | m_player = new Phonon::MediaObject(this); | 37 | m_player = new Phonon::MediaObject(this); |
| 38 | connect(m_player, SIGNAL(finished()), this, SLOT(finished_p())); | 38 | connect(m_player, SIGNAL(finished()), this, SLOT(finished_p())); |
| 39 | connect(m_player, SIGNAL(aboutToFinish()), this, SLOT(aboutToFinish_p())); | ||
| 39 | 40 | ||
| 40 | m_output = new Phonon::AudioOutput(Phonon::MusicCategory, m_player); | 41 | m_output = new Phonon::AudioOutput(Phonon::MusicCategory, m_player); |
| 41 | Phonon::createPath(m_player, m_output); | 42 | Phonon::createPath(m_player, m_output); |
| @@ -116,6 +117,11 @@ void AudioPlayer::finished_p() | |||
| 116 | emit finished(); | 117 | emit finished(); |
| 117 | } | 118 | } |
| 118 | 119 | ||
| 120 | void AudioPlayer::aboutToFinish_p() | ||
| 121 | { | ||
| 122 | emit aboutToFinish(); | ||
| 123 | } | ||
| 124 | |||
| 119 | void AudioPlayer::stateChanged_p(Phonon::State newstate, Phonon::State /* oldstate */) | 125 | void AudioPlayer::stateChanged_p(Phonon::State newstate, Phonon::State /* oldstate */) |
| 120 | { | 126 | { |
| 121 | if (newstate != Phonon::ErrorState) | 127 | if (newstate != Phonon::ErrorState) |
diff --git a/pacman-c++/audioplayer.h b/pacman-c++/audioplayer.h index dd128c5..55f1b92 100644 --- a/pacman-c++/audioplayer.h +++ b/pacman-c++/audioplayer.h | |||
| @@ -37,6 +37,7 @@ public: | |||
| 37 | 37 | ||
| 38 | signals: | 38 | signals: |
| 39 | void finished(); | 39 | void finished(); |
| 40 | void aboutToFinish(); | ||
| 40 | 41 | ||
| 41 | private: | 42 | private: |
| 42 | void test(); | 43 | void test(); |
| @@ -44,6 +45,7 @@ private: | |||
| 44 | 45 | ||
| 45 | private slots: | 46 | private slots: |
| 46 | void finished_p(); | 47 | void finished_p(); |
| 48 | void aboutToFinish_p(); | ||
| 47 | void stateChanged_p(Phonon::State newstate, Phonon::State oldstate); | 49 | void stateChanged_p(Phonon::State newstate, Phonon::State oldstate); |
| 48 | void testFinished(); | 50 | void testFinished(); |
| 49 | 51 | ||
