# Ambient sounds

**URL:** <https://discourse.cataclysmdda.org/t/ambient-sounds/9710>\
**Category:** The Lab\
**Created:** [May 31, 2015, 8:52am UTC](https://discourse.cataclysmdda.org/t/ambient-sounds/9710 "2015-05-31T08:52:35Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![vulkans](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/vulkans/32/46_2.png) [@vulkans](https://discourse.cataclysmdda.org/u/vulkans)\
**Post date:** [June 10, 2015, 2:53am UTC](https://discourse.cataclysmdda.org/t/ambient-sounds/9710/41 "2015-06-10T02:53:35Z")

</div>

Oh geez, it’d be text only as I’m a bit microphone shy… I can do the next best thing and link you to the information that helped me get everything setup:

[http://smf.cataclysmdda.com/index.php?topic=7646.0](http://smf.cataclysmdda.com/index.php?topic=7646.0)

Robik’s reply contains what you need for Windows, Sean Mirrsen’s later post contains a nice step by step breakdown. Step 7 can be skipped as the latest versions already include those changes, and with the recent addition of sdl\_mixer you need to go get the libraries and header here: [https://www.libsdl.org/projects/SDL\_mixer/](https://www.libsdl.org/projects/SDL_mixer/) (It’s SDL2\_mixer-devel-2.0.0-VC.zip if you’re on Windows). Particularly you need sdl\_mixer.h and sdl2\_mixer.lib from the x86 folder, the dlls will be needed to actually run the game once you’ve successfully compiled it, just copy them all so the game executable and dlls are all in the same folder.

Following those steps, I _think_ you’ll be able to successfully get a compiled binary without having to modify any of the game’s source.

---

<div class="post-metadata">

**Author:** ![SilverDragon](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@SilverDragon](https://discourse.cataclysmdda.org/u/SilverDragon)\
**Post date:** [June 10, 2015, 4:44am UTC](https://discourse.cataclysmdda.org/t/ambient-sounds/9710/42 "2015-06-10T04:44:09Z")

</div>

Thats fine, thanks mate i shall try my best 😛

---

<div class="post-metadata">

**Author:** ![CloppingIsMyThing](https://avatars.discourse-cdn.com/v4/letter/c/96bed5/32.png) [@CloppingIsMyThing](https://discourse.cataclysmdda.org/u/CloppingIsMyThing)\
**Post date:** [June 10, 2015, 6:10am UTC](https://discourse.cataclysmdda.org/t/ambient-sounds/9710/43 "2015-06-10T06:10:28Z")

</div>

HAHHAHAHA ok ill just wait till less smart is needed to add this XD

---

<div class="post-metadata">

**Author:** ![stk2008](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@stk2008](https://discourse.cataclysmdda.org/u/stk2008)\
**Post date:** [June 10, 2015, 7:24am UTC](https://discourse.cataclysmdda.org/t/ambient-sounds/9710/44 "2015-06-10T07:24:45Z")

</div>

Or wait till the licence stuff is sorted on the sound files and added to main game as a mod 😉

Woooot this looks so call thanks OP 🙂

---

<div class="post-metadata">

**Author:** ![CIB](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/cib/32/903_2.png) [@CIB](https://discourse.cataclysmdda.org/u/CIB)\
**Post date:** [June 10, 2015, 10:19am UTC](https://discourse.cataclysmdda.org/t/ambient-sounds/9710/45 "2015-06-10T10:19:10Z")

</div>

He just needs to PR his code changes into experimental, that’s not related to the sound file licensing.

---

<div class="post-metadata">

**Author:** ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)\
**Post date:** [June 11, 2015, 8:15am UTC](https://discourse.cataclysmdda.org/t/ambient-sounds/9710/46 "2015-06-11T08:15:16Z")

</div>

From the brief look I took I think it would go in pretty much immediately.

---

<div class="post-metadata">

**Author:** ![vulkans](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/vulkans/32/46_2.png) [@vulkans](https://discourse.cataclysmdda.org/u/vulkans)\
**Post date:** [June 12, 2015, 4:31am UTC](https://discourse.cataclysmdda.org/t/ambient-sounds/9710/47 "2015-06-12T04:31:35Z")

</div>

Trying to track down an intermittent divide by zero crash on mixer.c/mix\_volume(), haven’t been able to pin it down yet.

---

<div class="post-metadata">

**Author:** ![AdonaiJr](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/adonaijr/32/5893_2.png) [@AdonaiJr](https://discourse.cataclysmdda.org/u/AdonaiJr)\
**Post date:** [June 16, 2015, 3:16pm UTC](https://discourse.cataclysmdda.org/t/ambient-sounds/9710/48 "2015-06-16T15:16:04Z")

</div>

I’m looking toward this anxiously! 😃

But it’s pretty difficult for myself to try to compile this for windows, I think, though I didn’t tried very hard.

Anyway, it’s an amazing job you are doing, vulkans!

Any news on the bug you was trying to track down?

---

<div class="post-metadata">

**Author:** ![Dlightfull](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@Dlightfull](https://discourse.cataclysmdda.org/u/Dlightfull)\
**Post date:** [June 16, 2015, 5:58pm UTC](https://discourse.cataclysmdda.org/t/ambient-sounds/9710/49 "2015-06-16T17:58:54Z")

</div>

this looks sounds very very good, with the sole exception of the footsteps - they’re just too loud.

By the way, i am pretty sure crickets don’t sing when it’s raining.

---

<div class="post-metadata">

**Author:** ![AdonaiJr](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/adonaijr/32/5893_2.png) [@AdonaiJr](https://discourse.cataclysmdda.org/u/AdonaiJr)\
**Post date:** [June 16, 2015, 6:00pm UTC](https://discourse.cataclysmdda.org/t/ambient-sounds/9710/50 "2015-06-16T18:00:31Z")

</div>

Vulkans, I’m pretty close to compile your branch successfully in Windows, but I’m stuck at this strange error:

I didn’t change any code. I’ve followed the instructions (downloading libraries, making changes inside code:blocks, etc.) you mentioned before.

 ![](http://imgur.com/gmPNaEU.png)

Any thoughts?

---

<div class="post-metadata">

**Author:** ![AdonaiJr](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/adonaijr/32/5893_2.png) [@AdonaiJr](https://discourse.cataclysmdda.org/u/AdonaiJr)\
**Post date:** [June 16, 2015, 6:03pm UTC](https://discourse.cataclysmdda.org/t/ambient-sounds/9710/51 "2015-06-16T18:03:16Z")

</div>

[quote=“Dlightfull, post:49, topic:9710”]this looks sounds very very good, with the sole exception of the footsteps - they’re just too loud.

By the way, i am pretty sure crickets don’t sing when it’s raining.[/quote]

Dlightfull, [https://youtu.be/lm6IRweDZA8](https://youtu.be/lm6IRweDZA8), [https://youtu.be/YMc\_5LolPhI](https://youtu.be/YMc_5LolPhI)

looks (sounds) like he worked that out already, and much more 😉

---

<div class="post-metadata">

**Author:** ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)\
**Post date:** [June 17, 2015, 6:36am UTC](https://discourse.cataclysmdda.org/t/ambient-sounds/9710/52 "2015-06-17T06:36:17Z")

</div>

AddonaiJr: I think that was an issue with gcc version, the game needs version 4.8 or higher to compile.

---

<div class="post-metadata">

**Author:** ![Dlightfull](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@Dlightfull](https://discourse.cataclysmdda.org/u/Dlightfull)\
**Post date:** [June 17, 2015, 6:37am UTC](https://discourse.cataclysmdda.org/t/ambient-sounds/9710/53 "2015-06-17T06:37:17Z")

</div>

[quote=“AdonaiJr, post:51, topic:9710”][quote=“Dlightfull, post:49, topic:9710”]this looks sounds very very good, with the sole exception of the footsteps - they’re just too loud.

By the way, i am pretty sure crickets don’t sing when it’s raining.[/quote]

Dlightfull, [https://youtu.be/lm6IRweDZA8](https://youtu.be/lm6IRweDZA8), [https://youtu.be/YMc\_5LolPhI](https://youtu.be/YMc_5LolPhI)

looks (sounds) like he worked that out already, and much more ;)[/quote]

that’s awesome, i’d love to have that in the game

---

<div class="post-metadata">

**Author:** ![SilverDragon](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@SilverDragon](https://discourse.cataclysmdda.org/u/SilverDragon)\
**Post date:** [June 18, 2015, 2:58am UTC](https://discourse.cataclysmdda.org/t/ambient-sounds/9710/54 "2015-06-18T02:58:29Z")

</div>

> [@Kevin Granade](#):
>
> From the brief look I took I think it would go in pretty much immediately.

by that do you mean your gonna compile it into the main experimental branch? hopefully so as i failed horribly at it XD

---

<div class="post-metadata">

**Author:** ![CIB](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/cib/32/903_2.png) [@CIB](https://discourse.cataclysmdda.org/u/CIB)\
**Post date:** [June 18, 2015, 6:15am UTC](https://discourse.cataclysmdda.org/t/ambient-sounds/9710/55 "2015-06-18T06:15:36Z")

</div>

> [@SilverDragon](#):
>
> [quote=“Kevin Granade, post:46, topic:9710”]From the brief look I took I think it would go in pretty much immediately.

by that do you mean your gonna compile it into the main experimental branch? hopefully so as i failed horribly at it XD[/quote]

If vulkans were to PR it, yes. They seem to be busy lately, though.

---

<div class="post-metadata">

**Author:** ![Baleur](https://avatars.discourse-cdn.com/v4/letter/b/eb9ed0/32.png) [@Baleur](https://discourse.cataclysmdda.org/u/Baleur)\
**Post date:** [June 19, 2015, 3:31pm UTC](https://discourse.cataclysmdda.org/t/ambient-sounds/9710/56 "2015-06-19T15:31:31Z")

</div>

Checking this thread almost daily, in vain hopes that there will be a download some day.  
Seriously, this is what i want before i start playing Cataclysm again. Just cant bear the silence anymore.  
This just makes the game feel a hundred times more immersive and engaging, can’t go back to silent-Cataclysm.

Gameplay on pause until this is released.

---

<div class="post-metadata">

**Author:** ![vulkans](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/vulkans/32/46_2.png) [@vulkans](https://discourse.cataclysmdda.org/u/vulkans)\
**Post date:** [June 21, 2015, 3:26am UTC](https://discourse.cataclysmdda.org/t/ambient-sounds/9710/57 "2015-06-21T03:26:51Z")

</div>

I’m sorry, it’s not so much that I’m busy but rather that this was a hell of a project to pick up and I kind of went into it totally blind, which is why it’s such a slow going as everything I’m doing I’m having to learn along the way… C++ is a neat language but by George can it be hard to parse when you’re just getting into it, crappy ol’ VB6 definitely had me spoiled.

What have I been up to: Since the last post I was having trouble getting SDL\_mixer to cooperate after reaching a certain amount of loaded sounds- it was causing the game to randomly crash after about 1~2 hours of gameplay. Frustrated, I ripped out SDL\_mixer entirely and replaced it with Audiere which has finally eliminated the crashing and has the added advantage of a better feature set than SDL\_mixer. I’ve also been working on improving the way sounds are loaded, before I was loading a copy of audio per variant entry (eg: The Beretta M9 and the MP5 were each loading their own separate copy of the same sound) which is a bad way of going about things. I’ve changed this to loading a single sound entry and linking all the variants to use it instead.

Due to differences between how SDL\_mixer and Audiere works, I have to rethink and rewrite much of what I had in place which is what I’m currently hammering away at.

---

<div class="post-metadata">

**Author:** ![CIB](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/cib/32/903_2.png) [@CIB](https://discourse.cataclysmdda.org/u/CIB)\
**Post date:** [June 21, 2015, 10:46am UTC](https://discourse.cataclysmdda.org/t/ambient-sounds/9710/58 "2015-06-21T10:46:31Z")

</div>

Great to hear you’re making progress. With regards to SDL\_mixer, what we’d have needed is a sound cache that loads sound on demand and ensures not too many sound effects are loaded at the same time. I’d planned to do that but time has been really tight lately because I now got a part time job in addition to uni to deal with. ☹ It might be harder getting something with Audiere merged because it’ll add an additional build dependency and I don’t know Audiere so I’m not sure it’s as easy to install as SDL\_mixer.

By the way, with the high demand for this feature, maybe it’d make sense to set up a bountysource issue that people can back? Or are you not interested in money? Just wondering.

---

<div class="post-metadata">

**Author:** ![vulkans](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/vulkans/32/46_2.png) [@vulkans](https://discourse.cataclysmdda.org/u/vulkans)\
**Post date:** [June 21, 2015, 9:17pm UTC](https://discourse.cataclysmdda.org/t/ambient-sounds/9710/59 "2015-06-21T21:17:07Z")

</div>

I actually tried doing that as well, loading sounds only when needed and unloading them when they weren’t needed. I was still getting the same access violation crashes on sdl2.dll after a bit of playing, never managed to track down why as the game would then refuse to crash when running with debugging symbols. The divide by zero crashes I mentioned previously were related to how sdl\_mixer does its fade ins and fade outs when using specific audio channels, I couldn’t find a way to get around the problem without straight up modifying sdl\_mixer’s source and rebuilding it so I just stopped using faders.

Audiere was about the same amount of work to make than sdl\_mixer was as it has the exact same dependencies, this was on Windows using MSYS and mingw which is really rare that something will just make out of the box successfully without complaining. If it proves too troublesome to merge, I’ve still got the last working copy of the source using sdl\_mixer in version control which I can keep hammering at until it functions correctly.

Just doing this for fun really, and I’m not really a big fan of that style of crowdfunding site for a number of reasons, chief among them is the implied commitment that comes along with it. I’d rather just keep this for funsies so I don’t burn myself out.

Good luck with the new job! I know firsthand how tough it is to juggle school and work at the same time- tried it myself during the 90s and failed spectacularly. These days I mull over it all the time for not trying hard enough when I had the chance. But hey, like they say: “You’re never too old to learn” so hopefully later this year if things go well financially, I’ll be going back to finally finish that comp sci degree I left pending.

---

<div class="post-metadata">

**Author:** ![AdonaiJr](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/adonaijr/32/5893_2.png) [@AdonaiJr](https://discourse.cataclysmdda.org/u/AdonaiJr)\
**Post date:** [June 24, 2015, 7:46pm UTC](https://discourse.cataclysmdda.org/t/ambient-sounds/9710/60 "2015-06-24T19:46:21Z")

</div>

> [@Kevin Granade](#):
>
> AddonaiJr: I think that was an issue with gcc version, the game needs version 4.8 or higher to compile.

Thanks for the feedback Kevin! I did update my compiler, but this time I got another related error.

![](http://i.imgur.com/yGlvGPI.png)

edit: errors are coming from “sounds.h”

> [@Baleur](#):
>
> Checking this thread almost daily … This just makes the game feel a hundred times more immersive and engaging …

Baleur, I’m totally in this too, checking almost daily. I played Cataclysm just really little, but since the day I’ve seen this I can’t imagine playing without!

Vulkans, I really appreciate your efforts!

Guys, thanks for all feedback! Great people around this forums.

Sorry for my english.

[Previous page](https://discourse.cataclysmdda.org/t/ambient-sounds/9710.md?page=2)

[Next page](https://discourse.cataclysmdda.org/t/ambient-sounds/9710.md?page=4)
