From e51f474613c5d4bd53a8d213785bcb51f5cf447f Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sat, 9 Jul 2022 22:32:24 +0200 Subject: 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. --- src/sound.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/sound.h') 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 +}; -- cgit v1.2.3