Add music volume

This commit is contained in:
KaadmY 2017-05-11 14:21:03 -07:00
parent b51ff71ccc
commit 5c5f438b79

View File

@ -6,6 +6,7 @@
music = {} music = {}
music.default_track = minetest.setting_get("music_track") or "music_catsong" music.default_track = minetest.setting_get("music_track") or "music_catsong"
music.volume = tonumber(minetest.setting_get("music_volume")) or 1.0
music.players = {} -- music players music.players = {} -- music players
@ -36,7 +37,7 @@ if minetest.setting_getbool("music_enable") then
music.default_track, music.default_track,
{ {
pos = pos, pos = pos,
gain = 0.8, gain = music.volume,
}), }),
["timer"] = 0, ["timer"] = 0,
["pos"] = pos, ["pos"] = pos,
@ -48,7 +49,7 @@ if minetest.setting_getbool("music_enable") then
music.default_track, music.default_track,
{ {
pos = pos, pos = pos,
gain = 0.8, gain = music.volume,
}) })
end end
end end