Merged in rcoaxil/love-patches/minor (pull request #75)

EFX implemented

Approved-by: Bart van Strien
Approved-by: Alex Szpakowski

--HG--
branch : minor
This commit is contained in:
Bart van Strien
2017-02-11 19:04:53 +00:00
21 changed files with 2248 additions and 153 deletions
+21 -1
View File
@@ -35,6 +35,7 @@
#include "sound/SoundData.h"
#include "Source.h"
#include "Effect.h"
#include "Pool.h"
#include "thread/threads.h"
@@ -105,12 +106,24 @@ public:
void setDopplerScale(float scale);
float getDopplerScale() const;
//void setMeter(float scale);
//float getMeter() const;
const std::vector<love::audio::RecordingDevice*> &getRecordingDevices();
DistanceModel getDistanceModel() const;
void setDistanceModel(DistanceModel distanceModel);
bool setSceneEffect(int slot, std::map<Effect::Parameter, float> &params);
bool setSceneEffect(int slot);
bool getSceneEffect(int slot, std::map<Effect::Parameter, float> &params);
int getMaxSceneEffects() const;
int getMaxSourceEffects() const;
bool isEFXsupported() const;
ALuint getSceneEffectID(int slot);
int getSceneEffectIndex(ALuint effect);
private:
void initializeEFX();
// The OpenAL device.
@@ -122,6 +135,13 @@ private:
// The OpenAL context.
ALCcontext *context;
// The OpenAL effects
std::vector<Effect*> effects;
std::vector<ALuint> effectSlots;
std::map<ALuint, int> effectIndex;
int MAX_SCENE_EFFECTS = 16;
int MAX_SOURCE_EFFECTS = 16;
// The Pool.
Pool *pool;
@@ -148,7 +168,7 @@ private:
PoolThread *poolThread;
DistanceModel distanceModel;
//float metersPerUnit = 1.0;
}; // Audio
#ifdef ALC_EXT_EFX