diff --git a/Aquaria/Avatar.cpp b/Aquaria/Avatar.cpp index d4f8e55..a07fabf 100644 --- a/Aquaria/Avatar.cpp +++ b/Aquaria/Avatar.cpp @@ -506,7 +506,6 @@ void SongIcon::openNote() PlaySfx play; play.name = sfx; - play.channel = 1 + note; channel = dsq->sound->playSfx(play); diff --git a/BBGE/SoundManager.cpp b/BBGE/SoundManager.cpp index 88dd011..eec21c5 100644 --- a/BBGE/SoundManager.cpp +++ b/BBGE/SoundManager.cpp @@ -809,8 +809,6 @@ void SoundManager::setSfxChannelsVolume(float v) bool SoundManager::playVoice(const std::string &name, SoundVoiceType svt, float vmod) { - - if (!enabled) return false; bool checkOther = true; @@ -1435,17 +1433,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); - - return b; - - return BBGE_AUDIO_NOCHANNEL; + return loadSoundIntoBank(filename, localSoundPath, fileType, SFXLOAD_LOCAL); } void SoundManager::setMusicSpeed(float speed) { - - musicChannel->setFrequency(speed); } diff --git a/BBGE/SoundManager.h b/BBGE/SoundManager.h index bb63061..bbd7c46 100644 --- a/BBGE/SoundManager.h +++ b/BBGE/SoundManager.h @@ -21,15 +21,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef SOUNDMANAGER_H #define SOUNDMANAGER_H +#include #include #include #include #include #include "Vector.h" -#define BBGE_BUILD_FMODEX -const int BBGE_AUDIO_NOCHANNEL = 0; +#define BBGE_AUDIO_NOCHANNEL NULL + const int BBGE_AUDIO_LOOPINFINITE = -1; const int BBGE_AUDIO_LOOPNONE = 0; @@ -84,7 +85,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; @@ -93,7 +94,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;