aboutsummaryrefslogtreecommitdiff
path: root/src/sound.h
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2022-07-09 22:32:24 +0200
committerGitHub <noreply@github.com>2022-07-09 22:32:24 +0200
commite51f474613c5d4bd53a8d213785bcb51f5cf447f (patch)
tree1278a6dbf5e9507ed97a4ed66afcbcb71da3639d /src/sound.h
parent051181fa6ee00d8379e8a7dc7442b58342d4352b (diff)
downloadhax-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 'src/sound.h')
-rw-r--r--src/sound.h8
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
+};