summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-12-07 19:13:09 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-12-07 19:13:09 +0000
commit2aac6bb66eec7f69627d8c157800c2f6759aa98b (patch)
tree6fe059b322aa193547f8461d467706da5226a29b /plugins
parent09268f4d2e8d6a9ad69c46b5c2fbd80020e022c6 (diff)
MirLua: added PlayFile in m_sound
git-svn-id: http://svn.miranda-ng.org/main/trunk@15830 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/MirLua/src/m_sound.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/MirLua/src/m_sound.cpp b/plugins/MirLua/src/m_sound.cpp
index 00b3bdf963..3411f72971 100644
--- a/plugins/MirLua/src/m_sound.cpp
+++ b/plugins/MirLua/src/m_sound.cpp
@@ -32,11 +32,23 @@ static int lua_Play(lua_State *L)
return 1;
}
+static int lua_PlayFile(lua_State *L)
+{
+ const char *path = luaL_checkstring(L, 1);
+
+ INT_PTR res = SkinPlaySoundFile(ptrT(mir_utf8decodeT(path)));
+ lua_pushnumber(L, res);
+
+ return 1;
+}
+
static luaL_Reg soundApi[] =
{
{ "Add", lua_Add },
{ "Play", lua_Play },
+ { "PlayFile", lua_PlayFile },
+
{ NULL, NULL }
};