Merge pull request 2 by Bloutiouf: Sound attenuation by distanceSound

attenuation by distance.

Adds:
love.audio.[gs]etDistanceModel(model-identifier)
Source:[gs]etMinVolume(min-volume)
Source:[gs]etMaxVolume(max-volume)
Source:[gs]etDistance(reference, max)
Source:[gs]etRolloffFactor(rolloff)

Valid Distance models:
"none", "inverse", "inverse clamped", "linear", "linear clamped", "exponent",
"exponent clamped"

Suggestion:
Merge Source:setMinVolume, Source:setMinVolume and Source:setVolume. May be
confusing for lovers though.

May have broken platform/msvc2010/love.vcxproj.filters (had to be modified by
hand without really knowing what I am doing).
This commit is contained in:
vrld
2011-12-29 22:45:51 +01:00
17 changed files with 482 additions and 12 deletions
+8
View File
@@ -51,6 +51,14 @@ namespace audio
int w_Source_isStopped(lua_State * L);
int w_Source_isPaused(lua_State * L);
int w_Source_isStatic(lua_State * L);
int w_Source_setMinVolume(lua_State * L);
int w_Source_getMinVolume(lua_State * L);
int w_Source_setMaxVolume(lua_State * L);
int w_Source_getMinVolume(lua_State * L);
int w_Source_setDistance(lua_State * L);
int w_Source_getDistance(lua_State * L);
int w_Source_setRolloffFactor(lua_State * L);
int w_Source_getRolloffFactor(lua_State * L);
extern "C" int luaopen_source(lua_State * L);
} // audio