aboutsummaryrefslogtreecommitdiff
path: root/src/lua/audio/luaopen_Source.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-08-17 00:15:05 +0800
committerchai <chaifix@163.com>2018-08-17 00:15:05 +0800
commit952748a86c4ddf1d7e47b358a64904c35bacd4aa (patch)
tree2b65d1021a5b62beac5ac6b229b43856eaec29e9 /src/lua/audio/luaopen_Source.cpp
parent7f7f6b3f19703eaeaad3801e47749e0173faa2fc (diff)
*update
Diffstat (limited to 'src/lua/audio/luaopen_Source.cpp')
-rw-r--r--src/lua/audio/luaopen_Source.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lua/audio/luaopen_Source.cpp b/src/lua/audio/luaopen_Source.cpp
index b5db88f..25e44b3 100644
--- a/src/lua/audio/luaopen_Source.cpp
+++ b/src/lua/audio/luaopen_Source.cpp
@@ -18,42 +18,42 @@ namespace lua
static int l_play(lua_State* L)
{
Ref<Source>& ref = checkSource(L);
- (*ref).play();
+ ref->play();
return 0;
}
static int l_stop(lua_State* L)
{
Ref<Source>& ref = checkSource(L);
- (*ref).stop();
+ ref->stop();
return 0;
}
static int l_pause(lua_State* L)
{
Ref<Source>& ref = checkSource(L);
- (*ref).pause();
+ ref->pause();
return 0;
}
static int l_rewind(lua_State* L)
{
Ref<Source>& ref = checkSource(L);
- (*ref).rewind();
+ ref->rewind();
return 0;
}
static int l_resume(lua_State* L)
{
Ref<Source>& ref = checkSource(L);
- (*ref).resume();
+ ref->resume();
return 0;
}
static int l_isStop(lua_State* L)
{
Ref<Source>& ref = checkSource(L);
- bool isStop = (*ref).isStopped();
+ bool isStop = ref->isStopped();
luax_pushboolean(L, isStop);
return 1;
}
@@ -61,7 +61,7 @@ namespace lua
static int l_isPaused(lua_State* L)
{
Ref<Source>& ref = checkSource(L);
- bool isPaused = (*ref).isPaused();
+ bool isPaused = ref->isPaused();
luax_pushboolean(L, isPaused);
return 1;
}
@@ -70,7 +70,7 @@ namespace lua
{
Ref<Source>& ref = checkSource(L);
float volume = luax_checknumber(L, 2);
- (*ref).setVolume(volume);
+ ref->setVolume(volume);
return 0;
}
@@ -78,7 +78,7 @@ namespace lua
{
Ref<Source>& ref = checkSource(L);
bool loop = luax_checkbool(L, 2);
- (*ref).setLoop(loop);
+ ref->setLoop(loop);
return 0;
}