From b8da46ac18c4b51311add45144a06a41caea73c3 Mon Sep 17 00:00:00 2001 From: xawotihs Date: Sun, 23 Nov 2014 16:27:18 +0100 Subject: [PATCH] Fixed phonon support. --- JGE/src/pc/JSfx.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/JGE/src/pc/JSfx.cpp b/JGE/src/pc/JSfx.cpp index f7d08e3ba..c92a6fb3a 100644 --- a/JGE/src/pc/JSfx.cpp +++ b/JGE/src/pc/JSfx.cpp @@ -42,16 +42,16 @@ int JMusic::getPlayTime(){ JMusic::~JMusic() { -#ifdef QT_CONFIG - if(player) - delete player; - if(playlist) - delete playlist; -#elif defined USE_PHONON +#if defined USE_PHONON if(mOutput) delete mOutput; if(mMediaObject) delete mMediaObject; +#elif defined QT_CONFIG + if(player) + delete player; + if(playlist) + delete playlist; #elif defined WITH_FMOD JSoundSystem::GetInstance()->StopMusic(this); if (mTrack) FSOUND_Sample_Free(mTrack); @@ -76,7 +76,7 @@ JSample::JSample() JSample::~JSample() { -#ifdef QT_CONFIG +#if (defined QT_CONFIG) && (!defined USE_PHONON) if(effect) delete effect; #elif USE_PHONON @@ -155,7 +155,7 @@ void JSoundSystem::DestroySoundSystem() JMusic *JSoundSystem::LoadMusic(const char *fileName) { JMusic* music = NULL; -#ifdef QT_CONFIG +#if (defined QT_CONFIG) && (!defined USE_PHONON) music = new JMusic(); if (music) { @@ -202,7 +202,7 @@ JMusic *JSoundSystem::LoadMusic(const char *fileName) void JSoundSystem::PlayMusic(JMusic *music, bool looping) { -#ifdef QT_CONFIG +#if (defined QT_CONFIG) && (!defined USE_PHONON) if(music && music->player && music->playlist) { if(looping) @@ -242,7 +242,7 @@ void JSoundSystem::PlayMusic(JMusic *music, bool looping) void JSoundSystem::StopMusic(JMusic *music) { -#ifdef QT_CONFIG +#if (defined QT_CONFIG) && (!defined USE_PHONON) if (music && music->player && music->playlist) { music->player->stop(); @@ -299,7 +299,7 @@ void JSoundSystem::SetSfxVolume(int volume){ JSample *JSoundSystem::LoadSample(const char *fileName) { JSample* sample = NULL; -#ifdef QT_CONFIG +#if (defined QT_CONFIG) && (!defined USE_PHONON) sample = new JSample(); if (sample) { @@ -347,7 +347,7 @@ JSample *JSoundSystem::LoadSample(const char *fileName) void JSoundSystem::PlaySample(JSample *sample) { -#ifdef QT_CONFIG +#if (defined QT_CONFIG) && (!defined USE_PHONON) if(sample) { sample->effect->play();