// sound_play(spec, parameters) static int l_sound_play(lua_State *L) { SimpleSoundSpec spec; read_soundspec(L, 1, spec); ServerSoundParams params; read_server_sound_params(L, 2, params); s32 handle = get_server(L)->playSound(spec, params); lua_pushinteger(L, handle); return 1; }
// sound_play(spec, parameters) int ModApiServer::l_sound_play(lua_State *L) { NO_MAP_LOCK_REQUIRED; SimpleSoundSpec spec; read_soundspec(L, 1, spec); ServerSoundParams params; read_server_sound_params(L, 2, params); s32 handle = getServer(L)->playSound(spec, params); lua_pushinteger(L, handle); return 1; }