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

Method PlayMusic

LuaSTGPlus/LuaWrapper.cpp:1571–1579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1569 return 1;
1570 }
1571 static int PlayMusic(lua_State* L)LNOEXCEPT
1572 {
1573 const char* s = luaL_checkstring(L, 1);
1574 ResMusic* p = LRES.FindMusic(s);
1575 if (!p)
1576 return luaL_error(L, "music '%s' not found.", s);
1577 p->Play((float)luaL_optnumber(L, 2, 1.) * LRES.GetGlobalMusicVolume(), luaL_optnumber(L, 3, 0.));
1578 return 0;
1579 }
1580 static int StopMusic(lua_State* L)LNOEXCEPT
1581 {
1582 const char* s = luaL_checkstring(L, 1);

Callers

nothing calls this directly

Calls 3

FindMusicMethod · 0.80
GetGlobalMusicVolumeMethod · 0.80
PlayMethod · 0.45

Tested by

no test coverage detected