Skip to content

Custom Sounds

Aeltumn edited this page Oct 24, 2023 · 1 revision

Custom Sounds

Noxesium allows servers more control over sounds, when they're started, and while they're playing. You can start a sound from a specific start time, have the sound automatically loop, or modify the sound's volume while it's playing. However, this system is only available whenever sounds are played through a custom system where they are required to be given a unique integer id. This custom id allows them to be identified and modified throughout their runtime.

Starting Sounds

Sounds using this system must be started through the start_sound custom packet. This packet has similar options to the vanilla packet, more information about which can be found in the code implementation.

This packet also supports being ignored if a sound with the same id already exists or to start with an offset based on a UNIX timestamp as an anchor point.

Modify Sounds

The modfify_sound custom packet allows you to modify the volume of a sound played through the start_sound packet. It should be noted that setting/fading the volume to 0 will not stop the sound.

Stopping sounds

Custom sounds can be stopped similarly to vanilla sounds but using the stop_sound packet.

Clone this wiki locally