It's now possible to control individual sources.

This commit is contained in:
rude
2009-12-14 19:51:31 +01:00
parent c5e8308d5f
commit c39242a24a
+37 -4
View File
@@ -101,25 +101,58 @@ namespace audio
int w_stop(lua_State * L)
{
instance->stop();
if(lua_gettop(L) == 0)
{
instance->stop();
}
else
{
Source * s = luax_checksource(L, 1);
s->stop();
}
return 0;
}
int w_pause(lua_State * L)
{
instance->pause();
if(lua_gettop(L) == 0)
{
instance->pause();
}
else
{
Source * s = luax_checksource(L, 1);
s->pause();
}
return 0;
}
int w_resume(lua_State * L)
{
instance->resume();
if(lua_gettop(L) == 0)
{
instance->resume();
}
else
{
Source * s = luax_checksource(L, 1);
s->resume();
}
return 0;
}
int w_rewind(lua_State * L)
{
instance->rewind();
if(lua_gettop(L) == 0)
{
instance->rewind();
}
else
{
Source * s = luax_checksource(L, 1);
s->rewind();
}
return 0;
}