From 646c9849bc02c64398d5490b633132c0a3291441 Mon Sep 17 00:00:00 2001 From: manuel Date: Wed, 13 Apr 2011 03:49:23 +0200 Subject: adding google sounds --- pacman-c++/audio.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'pacman-c++/audio.cpp') 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) setLoop(AudioManager::self()->sound(sound)); } +void AudioPlayer::play() +{ + Phonon::MediaObject::play(); +} + +void AudioPlayer::play(Sound::Type sound) +{ + setCurrentSource(Phonon::MediaSource(AudioManager::self()->sound(sound))); + play(); +} + /* this is a simple hack to check if phonon can actually play sounds.. */ void AudioPlayer::test(QFile *testsound) { -- cgit v1.2.3