1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-12-28 15:55:51 +00:00

hopefully fix build on gcc6, tiny cleanup

... in fact i forgot that much more cleanup was already done
on the experimental branch. whatever.
This commit is contained in:
fgenesis 2016-06-20 01:56:27 +02:00
parent 96206dd82a
commit 84366ad533
3 changed files with 4 additions and 45 deletions

View file

@ -563,7 +563,6 @@ void SongIcon::openNote()
PlaySfx play;
play.name = sfx;
play.channel = 1 + note;
channel = dsq->sound->playSfx(play);

View file

@ -894,8 +894,6 @@ void SoundManager::setSfxChannelsVolume(float v)
bool SoundManager::playVoice(const std::string &name, SoundVoiceType svt, float vmod)
{
//debugLog("playVoice, masterSoundLock: " + name);
if (!enabled) return false;
bool checkOther = true;
@ -1219,9 +1217,6 @@ bool SoundManager::playMusic(const std::string &name, SoundLoopType slt, SoundFa
{
if (isPlayingMusic(name))
{
#ifdef BBGE_BUILD_OPENALOGG
if (masterSoundLock) SDL_mutexV(masterSoundLock);
#endif
return false;
}
}
@ -1552,27 +1547,11 @@ Buffer SoundManager::loadSoundIntoBank(const std::string &filename, const std::s
Buffer SoundManager::loadLocalSound(const std::string &filename)
{
Buffer b = loadSoundIntoBank(filename, localSoundPath, fileType, SFXLOAD_LOCAL);
#ifdef BBGE_BUILD_FMODEX
return b;
#endif
return BBGE_AUDIO_NOCHANNEL;
return loadSoundIntoBank(filename, localSoundPath, fileType, SFXLOAD_LOCAL);
}
void SoundManager::setMusicSpeed(float speed)
{
/*
FMOD_CAPS caps;
FMOD_SPEAKERMODE speakerMode;
int minf, maxf;
SoundCore::system->getDriverCaps(0, &caps, &minf, &maxf, &speakerMode);
std::ostringstream os;
os << "minf: " << minf << " maxf: " << maxf;
debugLog(os.str());
*/
musicChannel->setFrequency(speed);
}

View file

@ -21,42 +21,24 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef SOUNDMANAGER_H
#define SOUNDMANAGER_H
#include <stdlib.h>
#include <string>
#include <list>
#include <queue>
#include <set>
#include "Vector.h"
// if using SDL_MIXER
//const int BBGE_AUDIO_NOCHANNEL = -1;
#define BBGE_BUILD_FMODEX
//#define BBGE_BUILD_BASS20
//#define BBGE_BUILD_SDLMIXER
//#define BBGE_BUILD_IRRKLANG
//#define BBGE_BUILD_OPENALOGG
#ifdef BBGE_BUILD_OPENALOGG
const int BBGE_AUDIO_NOCHANNEL = -1;
#elif defined(BBGE_BUILD_FMODEX)
const int BBGE_AUDIO_NOCHANNEL = 0;
#endif
#define BBGE_AUDIO_NOCHANNEL NULL
const int BBGE_AUDIO_LOOPINFINITE = -1;
const int BBGE_AUDIO_LOOPNONE = 0;
namespace SoundCore
{
#if defined(BBGE_BUILD_OPENALOGG)
//struct Buffer;
#elif defined(BBGE_BUILD_FMODEX)
typedef void *Buffer;
#endif
}
enum SoundEffectType
@ -105,7 +87,7 @@ enum SoundLoadType
struct PlaySfx
{
PlaySfx() : priority(0.5), handle(0), vol(1), fade(SFT_NONE),
time(0), freq(1), loops(0), channel(BBGE_AUDIO_NOCHANNEL),
time(0), freq(1), loops(0),
maxdist(0), x(0), y(0), relative(true), positional(false) {}
std::string name;
@ -114,7 +96,6 @@ struct PlaySfx
float time;
float freq;
int loops;
int channel;
float priority;
float maxdist; // distance gain attenuation. if 0: use default value, -1: don't attenuate at all
SoundFadeType fade;