Added Source:getChannels. Positional/directional audio only works with 1-channel (mono) sources.

This commit is contained in:
Alex Szpakowski
2013-10-15 23:09:35 -04:00
parent f846ed60b2
commit cf6acfa258
7 changed files with 26 additions and 0 deletions
+8
View File
@@ -324,6 +324,13 @@ int w_Source_getRolloff(lua_State *L)
return 1;
}
int w_Source_getChannels(lua_State *L)
{
Source *t = luax_checksource(L, 1);
lua_pushinteger(L, t->getChannels());
return 1;
}
int w_Source_getType(lua_State *L)
{
Source *t = luax_checksource(L, 1);
@@ -377,6 +384,7 @@ static const luaL_Reg functions[] =
{ "setRolloff", w_Source_setRolloff},
{ "getRolloff", w_Source_getRolloff},
{ "getChannels", w_Source_getChannels },
{ "getType", w_Source_getType },
{ 0, 0 }