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
+44 -1
View File
@@ -28,6 +28,7 @@
#include "common/Module.h"
#include "common/StringMap.h"
#include "Source.h"
#include "Effect.h"
#include "RecordingDevice.h"
namespace love
@@ -188,7 +189,8 @@ public:
virtual void setDopplerScale(float scale) = 0;
virtual float getDopplerScale() const = 0;
//virtual void setMeter(float scale) = 0;
//virtual float getMeter() const = 0;
/**
* @return Reference to a vector of pointers to recording devices. May be empty.
**/
@@ -206,6 +208,47 @@ public:
*/
virtual void setDistanceModel(DistanceModel distanceModel) = 0;
/**
* Sets scene EFX effect.
* @param slot Slot to put effect into.
* @param fxparams Effect description table.
* @return true if successful, false otherwise.
*/
virtual bool setSceneEffect(int slot, std::map<Effect::Parameter, float> &params) = 0;
/**
* Removes scene EFX effect.
* @param slot Effect slot to clear.
* @return true if successful, false otherwise.
*/
virtual bool setSceneEffect(int slot) = 0;
/**
* Gets scene EFX effect.
* @param slot Slot from which to get effect.
* @param fxparams Effect description table.
* @return true if effect was present, false otherwise.
*/
virtual bool getSceneEffect(int slot, std::map<Effect::Parameter, float> &params) = 0;
/**
* Gets maximum number of scene EFX effects.
* @return number of effects.
*/
virtual int getMaxSceneEffects() const = 0;
/**
* Gets maximum number of source EFX effects.
* @return number of effects.
*/
virtual int getMaxSourceEffects() const = 0;
/**
* Gets EFX (or analog) availability.
* @return true if supported.
*/
virtual bool isEFXsupported() const = 0;
private:
static StringMap<DistanceModel, DISTANCE_MAX_ENUM>::Entry distanceModelEntries[];