Fixed phonon support.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user