aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/snd/CMakeLists.txt2
-rw-r--r--src/modules/snd/libkvisnd.cpp32
2 files changed, 16 insertions, 18 deletions
diff --git a/src/modules/snd/CMakeLists.txt b/src/modules/snd/CMakeLists.txt
index fcb3c60b0..6e287b597 100644
--- a/src/modules/snd/CMakeLists.txt
+++ b/src/modules/snd/CMakeLists.txt
@@ -1,5 +1,7 @@
# CMakeLists for src/modules/snd
+INCLUDE_DIRECTORIES(${PHONON_INCLUDE_DIR})
+
IF(WIN32)
LIST(APPEND LIBS -lwinmm)
ENDIF()
diff --git a/src/modules/snd/libkvisnd.cpp b/src/modules/snd/libkvisnd.cpp
index d6208d6d1..4152f59f6 100644
--- a/src/modules/snd/libkvisnd.cpp
+++ b/src/modules/snd/libkvisnd.cpp
@@ -37,15 +37,10 @@
#include <QSound>
#ifdef COMPILE_PHONON_SUPPORT
- #ifdef COMPILE_KDE_SUPPORT
- #include <Phonon/MediaObject>
- #include <Phonon/Path>
- #include <Phonon/Global>
- #else //!COMPILE_KDE_SUPPORT
- #include <phonon>
- #endif //!COMPILE_KDE_SUPPORT
- Phonon::MediaObject * g_pPhononPlayer=0;
- #include <QUrl>
+ #include <phonon/mediaobject.h>
+ #include <phonon/path.h>
+ Phonon::MediaObject * g_pPhononPlayer=0;
+ #include <QUrl>
#endif //!COMPILE_PHONON_SUPPORT
#if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)
@@ -98,6 +93,7 @@ KviSoundPlayer::KviSoundPlayer()
m_pSoundSystemDict = new KviPointerHashTable<QString,SoundSystemRoutine>(17,false);
m_pSoundSystemDict->setAutoDelete(true);
#ifdef COMPILE_PHONON_SUPPORT
+ qDebug("Inserting phonon");
m_pSoundSystemDict->insert("phonon",new SoundSystemRoutine(KVI_PTR2MEMBER(KviSoundPlayer::playPhonon)));
#endif //!COMPILE_PHONON_SUPPORT
#if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)
@@ -230,12 +226,12 @@ void KviSoundPlayer::detectSoundSystem()
#ifdef COMPILE_PHONON_SUPPORT
bool KviSoundPlayer::playPhonon(const QString &szFileName)
{
- if(isMuted()) return true;
+ if(isMuted()) return true;
if(!g_pPhononPlayer) g_pPhononPlayer= Phonon::createPlayer(Phonon::MusicCategory);
- if(g_pPhononPlayer->state()!=Phonon::ErrorState)
- {
+ if(g_pPhononPlayer->state()!=Phonon::ErrorState)
+ {
g_pPhononPlayer->setCurrentSource(QUrl(szFileName));
- g_pPhononPlayer->play();
+ g_pPhononPlayer->play();
}
return true;
}
@@ -590,12 +586,12 @@ void KviSoundThread::run()
KviPhononSoundThread::KviPhononSoundThread(const QString &szFileName)
: KviSoundThread(szFileName)
{
- if(!g_pPhononPlayer)
- {
+ if(!g_pPhononPlayer)
+ {
g_pPhononPlayer = Phonon::createPlayer(Phonon::MusicCategory);
- } else {
- if(g_pPhononPlayer->state()!=Phonon::ErrorState)
- g_pPhononPlayer->setCurrentSource(QUrl(szFileName));
+ } else {
+ if(g_pPhononPlayer->state()!=Phonon::ErrorState)
+ g_pPhononPlayer->setCurrentSource(QUrl(szFileName));
}
}