mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-06-07 17:11:56 +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:
parent
96206dd82a
commit
84366ad533
3 changed files with 4 additions and 45 deletions
|
@ -563,7 +563,6 @@ void SongIcon::openNote()
|
||||||
|
|
||||||
PlaySfx play;
|
PlaySfx play;
|
||||||
play.name = sfx;
|
play.name = sfx;
|
||||||
play.channel = 1 + note;
|
|
||||||
channel = dsq->sound->playSfx(play);
|
channel = dsq->sound->playSfx(play);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -894,8 +894,6 @@ void SoundManager::setSfxChannelsVolume(float v)
|
||||||
|
|
||||||
bool SoundManager::playVoice(const std::string &name, SoundVoiceType svt, float vmod)
|
bool SoundManager::playVoice(const std::string &name, SoundVoiceType svt, float vmod)
|
||||||
{
|
{
|
||||||
//debugLog("playVoice, masterSoundLock: " + name);
|
|
||||||
|
|
||||||
if (!enabled) return false;
|
if (!enabled) return false;
|
||||||
|
|
||||||
bool checkOther = true;
|
bool checkOther = true;
|
||||||
|
@ -1219,9 +1217,6 @@ bool SoundManager::playMusic(const std::string &name, SoundLoopType slt, SoundFa
|
||||||
{
|
{
|
||||||
if (isPlayingMusic(name))
|
if (isPlayingMusic(name))
|
||||||
{
|
{
|
||||||
#ifdef BBGE_BUILD_OPENALOGG
|
|
||||||
if (masterSoundLock) SDL_mutexV(masterSoundLock);
|
|
||||||
#endif
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1552,27 +1547,11 @@ Buffer SoundManager::loadSoundIntoBank(const std::string &filename, const std::s
|
||||||
|
|
||||||
Buffer SoundManager::loadLocalSound(const std::string &filename)
|
Buffer SoundManager::loadLocalSound(const std::string &filename)
|
||||||
{
|
{
|
||||||
Buffer b = loadSoundIntoBank(filename, localSoundPath, fileType, SFXLOAD_LOCAL);
|
return loadSoundIntoBank(filename, localSoundPath, fileType, SFXLOAD_LOCAL);
|
||||||
|
|
||||||
#ifdef BBGE_BUILD_FMODEX
|
|
||||||
return b;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return BBGE_AUDIO_NOCHANNEL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SoundManager::setMusicSpeed(float speed)
|
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);
|
musicChannel->setFrequency(speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,42 +21,24 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#ifndef SOUNDMANAGER_H
|
#ifndef SOUNDMANAGER_H
|
||||||
#define SOUNDMANAGER_H
|
#define SOUNDMANAGER_H
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include "Vector.h"
|
#include "Vector.h"
|
||||||
|
|
||||||
// if using SDL_MIXER
|
|
||||||
//const int BBGE_AUDIO_NOCHANNEL = -1;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define BBGE_BUILD_FMODEX
|
#define BBGE_BUILD_FMODEX
|
||||||
|
|
||||||
//#define BBGE_BUILD_BASS20
|
|
||||||
//#define BBGE_BUILD_SDLMIXER
|
|
||||||
//#define BBGE_BUILD_IRRKLANG
|
|
||||||
//#define BBGE_BUILD_OPENALOGG
|
|
||||||
|
|
||||||
|
#define BBGE_AUDIO_NOCHANNEL NULL
|
||||||
|
|
||||||
#ifdef BBGE_BUILD_OPENALOGG
|
|
||||||
const int BBGE_AUDIO_NOCHANNEL = -1;
|
|
||||||
#elif defined(BBGE_BUILD_FMODEX)
|
|
||||||
const int BBGE_AUDIO_NOCHANNEL = 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const int BBGE_AUDIO_LOOPINFINITE = -1;
|
const int BBGE_AUDIO_LOOPINFINITE = -1;
|
||||||
const int BBGE_AUDIO_LOOPNONE = 0;
|
const int BBGE_AUDIO_LOOPNONE = 0;
|
||||||
|
|
||||||
namespace SoundCore
|
namespace SoundCore
|
||||||
{
|
{
|
||||||
#if defined(BBGE_BUILD_OPENALOGG)
|
|
||||||
//struct Buffer;
|
|
||||||
#elif defined(BBGE_BUILD_FMODEX)
|
|
||||||
typedef void *Buffer;
|
typedef void *Buffer;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enum SoundEffectType
|
enum SoundEffectType
|
||||||
|
@ -105,7 +87,7 @@ enum SoundLoadType
|
||||||
struct PlaySfx
|
struct PlaySfx
|
||||||
{
|
{
|
||||||
PlaySfx() : priority(0.5), handle(0), vol(1), fade(SFT_NONE),
|
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) {}
|
maxdist(0), x(0), y(0), relative(true), positional(false) {}
|
||||||
|
|
||||||
std::string name;
|
std::string name;
|
||||||
|
@ -114,7 +96,6 @@ struct PlaySfx
|
||||||
float time;
|
float time;
|
||||||
float freq;
|
float freq;
|
||||||
int loops;
|
int loops;
|
||||||
int channel;
|
|
||||||
float priority;
|
float priority;
|
||||||
float maxdist; // distance gain attenuation. if 0: use default value, -1: don't attenuate at all
|
float maxdist; // distance gain attenuation. if 0: use default value, -1: don't attenuate at all
|
||||||
SoundFadeType fade;
|
SoundFadeType fade;
|
||||||
|
|
Loading…
Add table
Reference in a new issue