aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar Fabio Bas2009-09-24 15:35:43 +0000
committerGravatar Fabio Bas2009-09-24 15:35:43 +0000
commit55aa14d32a82f71b2e3c2261c3357be3777f81a5 (patch)
tree68e7c5f7ab2f74bad60209cc871274fd901d6c1f /src/modules
parentfix for #518 (diff)
downloadKVIrc-55aa14d32a82f71b2e3c2261c3357be3777f81a5.tar.gz
KVIrc-55aa14d32a82f71b2e3c2261c3357be3777f81a5.tar.bz2
KVIrc-55aa14d32a82f71b2e3c2261c3357be3777f81a5.zip
some phonon tweaking
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@3519 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/snd/libkvisnd.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/modules/snd/libkvisnd.cpp b/src/modules/snd/libkvisnd.cpp
index 40a364ac3..0c885faf5 100644
--- a/src/modules/snd/libkvisnd.cpp
+++ b/src/modules/snd/libkvisnd.cpp
@@ -37,8 +37,9 @@
#include <QSound>
#ifdef COMPILE_PHONON_SUPPORT
- #include <phonon/mediaobject.h>
- #include <phonon/path.h>
+ #include <Phonon/MediaSource>
+ #include <Phonon/MediaObject>
+ #include <Phonon/Path>
Phonon::MediaObject * g_pPhononPlayer=0;
#include <QUrl>
#endif //!COMPILE_PHONON_SUPPORT
@@ -207,10 +208,12 @@ void KviSoundPlayer::detectSoundSystem()
bool KviSoundPlayer::playPhonon(const QString &szFileName)
{
if(isMuted()) return true;
- if(!g_pPhononPlayer) g_pPhononPlayer= Phonon::createPlayer(Phonon::NotificationCategory);
+ Phonon::MediaSource media(szFileName);
+ if(!g_pPhononPlayer)
+ g_pPhononPlayer= Phonon::createPlayer(Phonon::MusicCategory,media);
+ else g_pPhononPlayer->setCurrentSource(media);
if(g_pPhononPlayer->state()!=Phonon::ErrorState)
{
- g_pPhononPlayer->setCurrentSource(QUrl(szFileName));
g_pPhononPlayer->play();
}
return true;