diff options
author | hecks <42101236+hecktest@users.noreply.github.com> | 2020-08-19 19:26:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-19 19:26:37 +0200 |
commit | 5bda36143f9bd332b6ba420d9b91be1713092eae (patch) | |
tree | 557b039274eca99156ee3b1d3adbc24a4a57d883 /doc | |
parent | 649211bf272df2dc7057347992c2653cf1c3a6fb (diff) | |
download | minetest-5bda36143f9bd332b6ba420d9b91be1713092eae.tar.gz minetest-5bda36143f9bd332b6ba420d9b91be1713092eae.tar.bz2 minetest-5bda36143f9bd332b6ba420d9b91be1713092eae.zip |
Clean up sound_fade (#10119)
Add proper documentation and correct gain reduction calculations.
Co-authored-by: hecktest <>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 88d99fcd5..ba55033dd 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -5238,9 +5238,12 @@ Sounds * `minetest.sound_fade(handle, step, gain)` * `handle` is a handle returned by `minetest.sound_play` * `step` determines how fast a sound will fade. - Negative step will lower the sound volume, positive step will increase - the sound volume. + The gain will change by this much per second, + until it reaches the target gain. + Note: Older versions used a signed step. This is deprecated, but old + code will still work. (the client uses abs(step) to correct it) * `gain` the target gain for the fade. + Fading to zero will delete the sound. Timing ------ |