Fixed phonon support.
This commit is contained in:
+12
-12
@@ -42,16 +42,16 @@ int JMusic::getPlayTime(){
|
|||||||
|
|
||||||
JMusic::~JMusic()
|
JMusic::~JMusic()
|
||||||
{
|
{
|
||||||
#ifdef QT_CONFIG
|
#if defined USE_PHONON
|
||||||
if(player)
|
|
||||||
delete player;
|
|
||||||
if(playlist)
|
|
||||||
delete playlist;
|
|
||||||
#elif defined USE_PHONON
|
|
||||||
if(mOutput)
|
if(mOutput)
|
||||||
delete mOutput;
|
delete mOutput;
|
||||||
if(mMediaObject)
|
if(mMediaObject)
|
||||||
delete mMediaObject;
|
delete mMediaObject;
|
||||||
|
#elif defined QT_CONFIG
|
||||||
|
if(player)
|
||||||
|
delete player;
|
||||||
|
if(playlist)
|
||||||
|
delete playlist;
|
||||||
#elif defined WITH_FMOD
|
#elif defined WITH_FMOD
|
||||||
JSoundSystem::GetInstance()->StopMusic(this);
|
JSoundSystem::GetInstance()->StopMusic(this);
|
||||||
if (mTrack) FSOUND_Sample_Free(mTrack);
|
if (mTrack) FSOUND_Sample_Free(mTrack);
|
||||||
@@ -76,7 +76,7 @@ JSample::JSample()
|
|||||||
|
|
||||||
JSample::~JSample()
|
JSample::~JSample()
|
||||||
{
|
{
|
||||||
#ifdef QT_CONFIG
|
#if (defined QT_CONFIG) && (!defined USE_PHONON)
|
||||||
if(effect)
|
if(effect)
|
||||||
delete effect;
|
delete effect;
|
||||||
#elif USE_PHONON
|
#elif USE_PHONON
|
||||||
@@ -155,7 +155,7 @@ void JSoundSystem::DestroySoundSystem()
|
|||||||
JMusic *JSoundSystem::LoadMusic(const char *fileName)
|
JMusic *JSoundSystem::LoadMusic(const char *fileName)
|
||||||
{
|
{
|
||||||
JMusic* music = NULL;
|
JMusic* music = NULL;
|
||||||
#ifdef QT_CONFIG
|
#if (defined QT_CONFIG) && (!defined USE_PHONON)
|
||||||
music = new JMusic();
|
music = new JMusic();
|
||||||
if (music)
|
if (music)
|
||||||
{
|
{
|
||||||
@@ -202,7 +202,7 @@ JMusic *JSoundSystem::LoadMusic(const char *fileName)
|
|||||||
|
|
||||||
void JSoundSystem::PlayMusic(JMusic *music, bool looping)
|
void JSoundSystem::PlayMusic(JMusic *music, bool looping)
|
||||||
{
|
{
|
||||||
#ifdef QT_CONFIG
|
#if (defined QT_CONFIG) && (!defined USE_PHONON)
|
||||||
if(music && music->player && music->playlist)
|
if(music && music->player && music->playlist)
|
||||||
{
|
{
|
||||||
if(looping)
|
if(looping)
|
||||||
@@ -242,7 +242,7 @@ void JSoundSystem::PlayMusic(JMusic *music, bool looping)
|
|||||||
|
|
||||||
void JSoundSystem::StopMusic(JMusic *music)
|
void JSoundSystem::StopMusic(JMusic *music)
|
||||||
{
|
{
|
||||||
#ifdef QT_CONFIG
|
#if (defined QT_CONFIG) && (!defined USE_PHONON)
|
||||||
if (music && music->player && music->playlist)
|
if (music && music->player && music->playlist)
|
||||||
{
|
{
|
||||||
music->player->stop();
|
music->player->stop();
|
||||||
@@ -299,7 +299,7 @@ void JSoundSystem::SetSfxVolume(int volume){
|
|||||||
JSample *JSoundSystem::LoadSample(const char *fileName)
|
JSample *JSoundSystem::LoadSample(const char *fileName)
|
||||||
{
|
{
|
||||||
JSample* sample = NULL;
|
JSample* sample = NULL;
|
||||||
#ifdef QT_CONFIG
|
#if (defined QT_CONFIG) && (!defined USE_PHONON)
|
||||||
sample = new JSample();
|
sample = new JSample();
|
||||||
if (sample)
|
if (sample)
|
||||||
{
|
{
|
||||||
@@ -347,7 +347,7 @@ JSample *JSoundSystem::LoadSample(const char *fileName)
|
|||||||
|
|
||||||
void JSoundSystem::PlaySample(JSample *sample)
|
void JSoundSystem::PlaySample(JSample *sample)
|
||||||
{
|
{
|
||||||
#ifdef QT_CONFIG
|
#if (defined QT_CONFIG) && (!defined USE_PHONON)
|
||||||
if(sample)
|
if(sample)
|
||||||
{
|
{
|
||||||
sample->effect->play();
|
sample->effect->play();
|
||||||
|
|||||||
Reference in New Issue
Block a user