diff options
author | SmallJoker <SmallJoker@users.noreply.github.com> | 2022-07-09 22:32:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-09 22:32:24 +0200 |
commit | e51f474613c5d4bd53a8d213785bcb51f5cf447f (patch) | |
tree | 1278a6dbf5e9507ed97a4ed66afcbcb71da3639d /src/sound.h | |
parent | 051181fa6ee00d8379e8a7dc7442b58342d4352b (diff) | |
download | hax-minetest-server-e51f474613c5d4bd53a8d213785bcb51f5cf447f.tar.gz hax-minetest-server-e51f474613c5d4bd53a8d213785bcb51f5cf447f.zip |
Sounds: Various little improvements (#12486)
Use SimpleSoundSpec where reasonable (OpenAL)
Ensure the sound IDs do not underflow or get overwritten -> loop in u16
Proper use of an enum.
Diffstat (limited to '')
-rw-r--r-- | src/sound.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sound.h b/src/sound.h index ddb4e3dc2..801c552a9 100644 --- a/src/sound.h +++ b/src/sound.h @@ -59,3 +59,11 @@ struct SimpleSoundSpec float pitch = 1.0f; bool loop = false; }; + + +// The order must not be changed. This is sent over the network. +enum class SoundLocation : u8 { + Local, + Position, + Object +}; |