diff options
Diffstat (limited to 'pacman-c++/audio.cpp')
| -rw-r--r-- | pacman-c++/audio.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pacman-c++/audio.cpp b/pacman-c++/audio.cpp index 8726899..6365a15 100644 --- a/pacman-c++/audio.cpp +++ b/pacman-c++/audio.cpp | |||
| @@ -197,6 +197,17 @@ void AudioPlayer::setLoop(Sound::Type sound) | |||
| 197 | setLoop(AudioManager::self()->sound(sound)); | 197 | setLoop(AudioManager::self()->sound(sound)); |
| 198 | } | 198 | } |
| 199 | 199 | ||
| 200 | void AudioPlayer::play() | ||
| 201 | { | ||
| 202 | Phonon::MediaObject::play(); | ||
| 203 | } | ||
| 204 | |||
| 205 | void AudioPlayer::play(Sound::Type sound) | ||
| 206 | { | ||
| 207 | setCurrentSource(Phonon::MediaSource(AudioManager::self()->sound(sound))); | ||
| 208 | play(); | ||
| 209 | } | ||
| 210 | |||
| 200 | /* this is a simple hack to check if phonon can actually play sounds.. */ | 211 | /* this is a simple hack to check if phonon can actually play sounds.. */ |
| 201 | void AudioPlayer::test(QFile *testsound) | 212 | void AudioPlayer::test(QFile *testsound) |
| 202 | { | 213 | { |
