sounds.lua 686 B

123456789101112131415161718192021222324
  1. ---@meta
  2. ---Sounds
  3. ---------
  4. ---@alias mt.SoundHandle unknown
  5. ---@param spec mt.SimpleSoundSpec
  6. ---@param parameters table A sound parameter table.
  7. --- `false`
  8. --- Ephemeral sounds will not return a handle and can't be stopped or faded.
  9. --- It is recommend to use this for short sounds that happen in response to
  10. --- player actions (e.g. door closing).
  11. ---@param ephemeral boolean|nil
  12. ---@return mt.SoundHandle handle
  13. function minetest.sound_play(spec, parameters, ephemeral) end
  14. ---@param handle mt.SoundHandle
  15. function minetest.sound_stop(handle) end
  16. ---@param handle mt.SoundHandle
  17. ---@param step number
  18. ---@param gain number
  19. function minetest.sound_fade(handle, step, gain) end