mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-02-04 02:24:00 +00:00
Merge branch 'master' into experimental
Conflicts: BBGE/SoundManager.cpp BBGE/SoundManager.h
This commit is contained in:
commit
548da72632
3 changed files with 5 additions and 14 deletions
|
@ -506,7 +506,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);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -809,8 +809,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)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
if (!enabled) return false;
|
if (!enabled) return false;
|
||||||
|
|
||||||
bool checkOther = true;
|
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 SoundManager::loadLocalSound(const std::string &filename)
|
||||||
{
|
{
|
||||||
Buffer b = loadSoundIntoBank(filename, localSoundPath, fileType, SFXLOAD_LOCAL);
|
return loadSoundIntoBank(filename, localSoundPath, fileType, SFXLOAD_LOCAL);
|
||||||
|
|
||||||
return b;
|
|
||||||
|
|
||||||
return BBGE_AUDIO_NOCHANNEL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SoundManager::setMusicSpeed(float speed)
|
void SoundManager::setMusicSpeed(float speed)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
musicChannel->setFrequency(speed);
|
musicChannel->setFrequency(speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,15 +21,16 @@ 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"
|
||||||
|
|
||||||
#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_LOOPINFINITE = -1;
|
||||||
const int BBGE_AUDIO_LOOPNONE = 0;
|
const int BBGE_AUDIO_LOOPNONE = 0;
|
||||||
|
|
||||||
|
@ -84,7 +85,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;
|
||||||
|
@ -93,7 +94,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