Merged default into minor

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2014-08-09 19:55:29 -03:00
31 changed files with 110 additions and 123 deletions
+11 -2
View File
@@ -63,6 +63,7 @@ int w_newSource(lua_State *L)
if (t)
{
luax_pushtype(L, "Source", AUDIO_SOURCE_T, t);
t->release();
return 1;
}
else
@@ -224,7 +225,10 @@ int w_getRecordedData(lua_State *L)
if (!sd)
lua_pushnil(L);
else
{
luax_pushtype(L, "SoundData", SOUND_SOUND_DATA_T, sd);
sd->release();
}
return 1;
}
@@ -233,8 +237,13 @@ int w_stopRecording(lua_State *L)
if (luax_optboolean(L, 1, true))
{
love::sound::SoundData *sd = instance()->stopRecording(true);
if (!sd) lua_pushnil(L);
else luax_pushtype(L, "SoundData", SOUND_SOUND_DATA_T, sd);
if (!sd)
lua_pushnil(L);
else
{
luax_pushtype(L, "SoundData", SOUND_SOUND_DATA_T, sd);
sd->release();
}
return 1;
}
instance()->stopRecording(false);
+1
View File
@@ -38,6 +38,7 @@ int w_Source_clone(lua_State *L)
Source *clone = nullptr;
luax_catchexcept(L, [&](){ clone = t->clone(); });
luax_pushtype(L, "Source", AUDIO_SOURCE_T, clone);
clone->release();
return 1;
}