MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / PlaySound

Method PlaySound

LuaSTGPlus/LuaWrapper.cpp:1521–1529  ·  view source on GitHub ↗

声音控制函数

Source from the content-addressed store, hash-verified

1519
1520 // 声音控制函数
1521 static int PlaySound(lua_State* L)LNOEXCEPT
1522 {
1523 const char* s = luaL_checkstring(L, 1);
1524 ResSound* p = LRES.FindSound(s);
1525 if (!p)
1526 return luaL_error(L, "sound '%s' not found.", s);
1527 p->Play((float)luaL_checknumber(L, 2) * LRES.GetGlobalSoundEffectVolume(), (float)luaL_optnumber(L, 3, 0.));
1528 return 0;
1529 }
1530 static int StopSound(lua_State* L)LNOEXCEPT
1531 {
1532 const char* s = luaL_checkstring(L, 1);

Callers

nothing calls this directly

Calls 3

FindSoundMethod · 0.80
PlayMethod · 0.45

Tested by

no test coverage detected