# Implementing in NetHack - No sound playing

**URL:** <https://qa.fmod.com/t/implementing-in-nethack-no-sound-playing/20681>\
**Category:** FMOD Engine\
**Created:** [September 21, 2023, 1:13am UTC](https://qa.fmod.com/t/implementing-in-nethack-no-sound-playing/20681 "2023-09-21T01:13:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrEveryDay](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@MrEveryDay](https://qa.fmod.com/u/MrEveryDay)\
**Post date:** [September 21, 2023, 1:13am UTC](https://qa.fmod.com/t/implementing-in-nethack-no-sound-playing/20681/1 "2023-09-21T01:13:53Z")

</div>

Quick note: I am not a programmer, however when you want a feature bad enough you gotta at least try to do the work yourself

I am working on implementing the FMOD Core API into NetHack to replace the barebones win32api that it currently uses by default for sound playback.  
I have had success before in getting FMOD to work, but after some internal code changes to the game I am unable to get FMOD to play any sound. The glue-code has already been merged and can be viewed here:

> <https://github.com/NetHack/NetHack/blob/NetHack-3.7/sound/fmod/fmod.c>

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [September 21, 2023, 2:34am UTC](https://qa.fmod.com/t/implementing-in-nethack-no-sound-playing/20681/2 "2023-09-21T02:34:07Z")

</div>

Hi,

Your code seems fine at a glance, though on an unrelated note I would recommend releasing created Sounds with [`Sound::release`](https://www.fmod.com/docs/2.02/api/core-api-sound.html#sound_release) when you’re done with them.

To get more information on any issues you’re encountering, you can do two things:

- Almost all API functions return [`FMOD_RESULT`](https://www.fmod.com/docs/2.02/api/core-api-common.html#fmod_result), which will provide you with more information on the error if one occurred. Try checking the results of the API functions you’re calling and see which ones are having issues.
- It’s slightly more complex, but [`Debug_Initialize`](https://www.fmod.com/docs/2.02/api/core-api-common.html#debug_initialize) can be used to have FMOD output debugging information. Setting the debugging level to [FMOD\_DEBUG\_LEVEL\_LOG](https://www.fmod.com/docs/2.02/api/core-api-common.html#fmod_debug_level_log) will provide fairly comprehensive information about the FMOD System’s operations, including any warnings and errors. Note that you’ll need to be using the logging version of the FMOD library (i.e. fmodL.dll instead of fmod.dll) in order for this work.

Give those a shot and let me know whether you’ve been able to track down the issue. If you’re unable to figure out the problem, please provide me with the entire output of `Debug_Initialize` with the debug level set to log so I can help to diagnose it.

---

<div class="post-metadata">

**Author:** ![MrEveryDay](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@MrEveryDay](https://qa.fmod.com/u/MrEveryDay)\
**Post date:** [September 22, 2023, 10:34pm UTC](https://qa.fmod.com/t/implementing-in-nethack-no-sound-playing/20681/3 "2023-09-22T22:34:25Z")

</div>

Checked these values after the game was running and where sound SHOULD already be working  
Am I right in assuming that FMOD\_OK should be (1) and not (0)?

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/f/fedac5e624df3f3de1c3ff70b40b9d785673544e.png)

---

<div class="post-metadata">

**Author:** ![MrEveryDay](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@MrEveryDay](https://qa.fmod.com/u/MrEveryDay)\
**Post date:** [September 23, 2023, 8:02pm UTC](https://qa.fmod.com/t/implementing-in-nethack-no-sound-playing/20681/4 "2023-09-23T20:02:46Z")

</div>

This implementation was working, the issue was something in the build process. Thank y’all for your time
