aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/audio/je_lua_source.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/modules/audio/je_lua_source.cpp')
-rw-r--r--src/lua/modules/audio/je_lua_source.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/lua/modules/audio/je_lua_source.cpp b/src/lua/modules/audio/je_lua_source.cpp
index 04f0528..2297fea 100644
--- a/src/lua/modules/audio/je_lua_source.cpp
+++ b/src/lua/modules/audio/je_lua_source.cpp
@@ -10,9 +10,9 @@ namespace JinEngine
namespace Lua
{
- typedef Shared<Source>& SourceRef;
+ typedef Shared<Source>& SharedSource;
- LUA_IMPLEMENT inline SourceRef checkSource(lua_State* L)
+ LUA_IMPLEMENT inline SharedSource checkSource(lua_State* L)
{
Proxy* proxy = (Proxy*)luax_checktype(L, 1, JIN_AUDIO_SOURCE);
return proxy->getShared<Source>();
@@ -20,68 +20,68 @@ namespace JinEngine
LUA_IMPLEMENT int l_play(lua_State* L)
{
- SourceRef ref = checkSource(L);
- ref->play();
+ SharedSource shared = checkSource(L);
+ shared->play();
return 0;
}
LUA_IMPLEMENT int l_stop(lua_State* L)
{
- SourceRef ref = checkSource(L);
- ref->stop();
+ SharedSource shared = checkSource(L);
+ shared->stop();
return 0;
}
LUA_IMPLEMENT int l_pause(lua_State* L)
{
- SourceRef ref = checkSource(L);
- ref->pause();
+ SharedSource shared = checkSource(L);
+ shared->pause();
return 0;
}
LUA_IMPLEMENT int l_rewind(lua_State* L)
{
- SourceRef ref = checkSource(L);
- ref->rewind();
+ SharedSource shared = checkSource(L);
+ shared->rewind();
return 0;
}
LUA_IMPLEMENT int l_resume(lua_State* L)
{
- SourceRef ref = checkSource(L);
- ref->resume();
+ SharedSource shared = checkSource(L);
+ shared->resume();
return 0;
}
LUA_IMPLEMENT int l_isStop(lua_State* L)
{
- SourceRef ref = checkSource(L);
- bool isStop = ref->isStopped();
+ SharedSource shared = checkSource(L);
+ bool isStop = shared->isStopped();
luax_pushboolean(L, isStop);
return 1;
}
LUA_IMPLEMENT int l_isPaused(lua_State* L)
{
- SourceRef ref = checkSource(L);
- bool isPaused = ref->isPaused();
+ SharedSource shared = checkSource(L);
+ bool isPaused = shared->isPaused();
luax_pushboolean(L, isPaused);
return 1;
}
LUA_IMPLEMENT int l_setVolume(lua_State* L)
{
- SourceRef ref = checkSource(L);
+ SharedSource shared = checkSource(L);
float volume = luax_checknumber(L, 2);
- ref->setVolume(volume);
+ shared->setVolume(volume);
return 0;
}
LUA_IMPLEMENT int l_setLoop(lua_State* L)
{
- SourceRef ref = checkSource(L);
+ SharedSource shared = checkSource(L);
bool loop = luax_checkbool(L, 2);
- ref->setLoop(loop);
+ shared->setLoop(loop);
return 0;
}