diff options
| author | manuel <manuel@mausz.at> | 2011-04-09 01:00:21 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-04-09 01:00:21 +0200 |
| commit | 373af4019b134f8abad85d4da5e4c907fb6c64a8 (patch) | |
| tree | 21f56b40daf1f0cf1b28edd7c63141524a46a3af /pacman-c++/audioplayer.cpp | |
| parent | 354d090ce32c074b7069ed29fa1adde2c30ea72e (diff) | |
| download | foop-373af4019b134f8abad85d4da5e4c907fb6c64a8.tar.gz foop-373af4019b134f8abad85d4da5e4c907fb6c64a8.tar.bz2 foop-373af4019b134f8abad85d4da5e4c907fb6c64a8.zip | |
add aboutToFinish to audioplayer
Diffstat (limited to 'pacman-c++/audioplayer.cpp')
| -rw-r--r-- | pacman-c++/audioplayer.cpp | 6 |
1 files changed, 6 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) |
