J :
* Fix linux compilation that had been broken by the last update.
This commit is contained in:
@@ -122,6 +122,6 @@ endif
|
|||||||
|
|
||||||
Makefile.linux:
|
Makefile.linux:
|
||||||
g++ -o /dev/null src/testfeatures.c -L$(LIBDIR) -lfmod-3.75
|
g++ -o /dev/null src/testfeatures.c -L$(LIBDIR) -lfmod-3.75
|
||||||
@if [ "0" == "$?" ]; then echo 'FMOD=-DWITH_FMOD'; else echo 'FMOD=-DWITHOUT_FMOD'; fi > $@
|
@if [ "0" = "$$?" ]; then echo 'FMOD=-DWITH_FMOD'; else echo 'FMOD=-DWITHOUT_FMOD'; fi > $@
|
||||||
|
|
||||||
-include Makefile.$(TARGET_ARCHITECTURE)
|
-include Makefile.$(TARGET_ARCHITECTURE)
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
#include "JMP3.h"
|
#include "JMP3.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef WITH_FMOD
|
||||||
|
#include "../Dependencies/include/fmod.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------------
|
||||||
class JMusic
|
class JMusic
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// JGE++ is a hardware accelerated 2D game SDK for PSP/Windows.
|
// JGE++ is a hardware accelerated 2D game SDK for PSP/Windows.
|
||||||
//
|
//
|
||||||
// Licensed under the BSD license, see LICENSE in JGE root for details.
|
// Licensed under the BSD license, see LICENSE in JGE root for details.
|
||||||
//
|
//
|
||||||
// Copyright (c) 2007 James Hui (a.k.a. Dr.Watson) <jhkhui@gmail.com>
|
// Copyright (c) 2007 James Hui (a.k.a. Dr.Watson) <jhkhui@gmail.com>
|
||||||
//
|
//
|
||||||
//-------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------
|
||||||
@@ -115,7 +115,7 @@ JMusic *JSoundSystem::LoadMusic(const char *fileName)
|
|||||||
{
|
{
|
||||||
#ifndef WITH_FMOD
|
#ifndef WITH_FMOD
|
||||||
return NULL;
|
return NULL;
|
||||||
#elif
|
#else
|
||||||
JMusic* music = new JMusic();
|
JMusic* music = new JMusic();
|
||||||
if (music)
|
if (music)
|
||||||
{
|
{
|
||||||
@@ -126,7 +126,7 @@ JMusic *JSoundSystem::LoadMusic(const char *fileName)
|
|||||||
char *buffer = new char[size];
|
char *buffer = new char[size];
|
||||||
fileSystem->ReadFile(buffer, size);
|
fileSystem->ReadFile(buffer, size);
|
||||||
music->mTrack = FSOUND_Sample_Load(FSOUND_UNMANAGED, buffer, FSOUND_LOADMEMORY, 0, size);
|
music->mTrack = FSOUND_Sample_Load(FSOUND_UNMANAGED, buffer, FSOUND_LOADMEMORY, 0, size);
|
||||||
|
|
||||||
delete[] buffer;
|
delete[] buffer;
|
||||||
fileSystem->CloseFile();
|
fileSystem->CloseFile();
|
||||||
}
|
}
|
||||||
@@ -176,7 +176,7 @@ void JSoundSystem::SetMusicVolume(int volume)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void JSoundSystem::SetSfxVolume(int volume){
|
void JSoundSystem::SetSfxVolume(int volume){
|
||||||
//this sets the volume to all channels then reverts back the volume for music..
|
//this sets the volume to all channels then reverts back the volume for music..
|
||||||
//that's a bit dirty but it works
|
//that's a bit dirty but it works
|
||||||
#ifdef WITH_FMOD
|
#ifdef WITH_FMOD
|
||||||
FSOUND_SetVolumeAbsolute(FSOUND_ALL, volume * 2.55);
|
FSOUND_SetVolumeAbsolute(FSOUND_ALL, volume * 2.55);
|
||||||
|
|||||||
Reference in New Issue
Block a user