# Sounds!

**URL:** <https://discourse.cataclysmdda.org/t/sounds/13730>\
**Category:** The Toolbox\
**Created:** [May 10, 2017, 6:57pm UTC](https://discourse.cataclysmdda.org/t/sounds/13730 "2017-05-10T18:57:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rtos](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@Rtos](https://discourse.cataclysmdda.org/u/Rtos)\
**Post date:** [May 10, 2017, 6:57pm UTC](https://discourse.cataclysmdda.org/t/sounds/13730/1 "2017-05-10T18:57:12Z")

</div>

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!  
Rtos

---

<div class="post-metadata">

**Author:** ![Zhilkin](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/zhilkin/32/3749_2.png) [@Zhilkin](https://discourse.cataclysmdda.org/u/Zhilkin)\
**Post date:** [May 13, 2017, 8:13am UTC](https://discourse.cataclysmdda.org/t/sounds/13730/2 "2017-05-13T08:13:29Z")

</div>

You would like to look into source code:

> <https://github.com/CleverRaven/Cataclysm-DDA/blob/e371045f28f77bbaa1b19db76f94c85e8e385b06/src/sounds.h>

  

> <https://github.com/CleverRaven/Cataclysm-DDA/blob/e79ded4f8ef1205cd9da0e224f362094fec58276/src/sounds.cpp>
