I have some specific questions regarding sounds in CDDA and how they are triggered. I’m currently working on improving the Chesthole soundpack, replacing sounds that doesn’t fall under a CC licence and adding some variety, homogeneity, dynamism and realism.
Specificaly, I’m wondering how the weather effects are triggered, and how CDDA handle sounds in general.

1- How does the game handle loops? i.e. does it have a buildt in “fade in/fade out” function, or does it just repeat the sample?
2- If the game have such function, is it possible to add multiple variants to weather effects/room tones/ambient sounds?
3- Is the game able to stop a sound or does the sample need to play until the end?
4- Is there a limit to the length of each samples theorically? Or the size?

Also if you have an idea or a comment regarding sound design in general for CDDA please let me know!

You would like to look into source code: