minetest.register_on_joinplayer(function(player)
  audio_lib.init_player(player:get_player_name())
end)



minetest.register_on_leaveplayer(function(player)
  audio_lib.dealloc_player(player:get_player_name())
end)
