diff options
| author | 2009-09-24 15:35:43 +0000 | |
|---|---|---|
| committer | 2009-09-24 15:35:43 +0000 | |
| commit | 55aa14d32a82f71b2e3c2261c3357be3777f81a5 (patch) | |
| tree | 68e7c5f7ab2f74bad60209cc871274fd901d6c1f /src | |
| parent | fix for #518 (diff) | |
| download | KVIrc-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')
| -rw-r--r-- | src/modules/snd/libkvisnd.cpp | 11 |
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; |
