Jump to content

[SOLVED] Compiled ZDoom has no sound


Recommended Posts

Title speaks for itself. I've managed to compile ZDoom 2.8.1 (NOT GZDoom), using VS 2019 x64 and the exact instructions from the Wiki, but for some reason, there's no sound at all. Music only plays with the Microsoft GS synth, and sound effects have no way of playing. How do I fix this?

Edit: I did not change anything in the code. So I'm compiling ZDoom as is from the ZDoom site.

Edited by jmpt16

Share this post


Link to post

Like modern GZDoom, what you build has no sound system to play the sounds with. You will have to get the binary ZDoom 2.8.1 distribution, extract the FMOD DLL and place it alongside your EXE.

 

Share this post


Link to post

If you compile ZDoom 2.8.1 you need the corresponding DLL. FMod neither has a stable API nor ABI, so exchanging FMOD versions without swapping out the sound implementation and recompiling with the new headers won't work.

 

That "ancient crap" version of FMod still works fine, ZDoom does not need any of the more recent features.

Generally, I'd recommend to use a more recent GZDoom. ZDoom 2.8.1 as a whole might be considered "ancient crap" by now - it is 6 years old and was built with 15 year old systems as baseline.

 

 

Share this post


Link to post

I would also recommend the OP to just use GZDoom (unless they for some reason really don't want to).  Even on my potatoe of a system, the GLES renderer is locked at 60 constantly.

Edited by Gibbon

Share this post


Link to post
3 hours ago, Graf Zahl said:

Like modern GZDoom, what you build has no sound system to play the sounds with. You will have to get the binary ZDoom 2.8.1 distribution, extract the FMOD DLL and place it alongside your EXE.

 

Where do I find / get FMOD.DLL?

 

2 hours ago, Gibbon said:

Don't think I didn't notice that self promo, lol

 

44 minutes ago, Gibbon said:

I would also recommend the OP to just use GZDoom (unless they for some reason really don't want to).  Even on my potatoe of a system, the GLES renderer is locked at 60 constantly.

Ironically, like you, I also wanted a stripped down version of ZDoom. Guess I might compile your version.

Share this post


Link to post
Just now, jmpt16 said:

Where do I find / get FMOD.DLL?

 

Don't think I didn't notice that self promo, lol

 

Ironically, like you, I also wanted a stripped down version of ZDoom. Guess I might compile your version.

 

The old fmodex.dll can be found on the original ZDoom binary distribution.

 

To compile ZDoom and RZ with FMOD will require you to register at fmod's website and download it there.  FMOD is proprietary and not freely redistributable.

Share this post


Link to post
Just now, Gibbon said:

 

The old fmodex.dll can be found on the original ZDoom binary distribution.

So fmodex.dll isn't in the source code?

Share this post


Link to post

Ok even with "fmodex.dll" taken from the Windows build, still no sound. What am I missing?

Edited by jmpt16

Share this post


Link to post

But did you install the proper FModEx SDK and added the locations in CMake GUI? Else you compiled without sound.

BTW have you compiled the 64 or 32 bit version? I guess x64.

Share this post


Link to post
6 minutes ago, drfrag said:

BTW have you compiled the 64 or 32 bit version? I guess x64.

yep, x64, the default as per the instructions.
 

6 minutes ago, drfrag said:

But did you install the proper FModEx SDK

Ah.
So I went to FMod's site. Do I install FMod Studio or Engine?

 

9 minutes ago, drfrag said:

and added the locations in CMake GUI?

And then how do I do that?

Share this post


Link to post
8 minutes ago, jmpt16 said:

So I went to FMod's site. Do I install FMod Studio or Engine?

Neither! What you need is FMOD EX. Which they very well might have removed from their offer.

 

That was one of the problems with using FMOD. They regularly go through massive new versions (FMOD -> FMOD EX -> FMOD Studio -> FMOD Engine) and they don't keep the old versions, but since there's no API or ABI compatibility other programs have to keep up with them.

 

Since the core focus of their customer base is their paying customers, that is to say, big studio games instead of free software apps, that's not a problem. People use whichever is most current during game development, and ship the exe with the FMOD dll. Then it's done and things don't change; the studio goes on to develop their next game.

 

That, along with the incompatibility with the GPL license, was one of the big reasons why GZDoom ditched FMOD and switched to FMOD. I think at some point we even had to ask them permission to rehost an older version of the SDK.

Share this post


Link to post
1 hour ago, drfrag said:

It's archived, for that version you need 4.36.23.

https://zdoom.org/files/fmod/

Ok, I installed the exe, now how do I get fmodex.dll?

 

1 hour ago, drfrag said:

Set FMOD_INCLUDE_DIR and FMOD_LIBRARY.

In CMake? I don't see it....

Share this post


Link to post
3 hours ago, jmpt16 said:

In CMake? I don't see it....

If you don't see the FMOD section, click configure again and it should show up.

 

3 hours ago, jmpt16 said:

Ok, I installed the exe, now how do I get fmodex.dll?

If you did a default install, fmodex64.dll and the proper directories should be in "C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Windows\api"

 

And make sure to link the additional directory and dependencies to "zdoom" in VS.

And make sure to set the actual .lib file in CMake, not just the folder it's in.

Edited by Lippeth

Share this post


Link to post
51 minutes ago, Lippeth said:

If you don't see the FMOD section, click configure again and it should show up.

If you did a default install, fmodex64.dll and the proper directories should be in "C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Windows\api"

image.png.4f452800d0a03179a32192bcb0b8f451.png
Yep, all here and acounted for. Still no sound.

 

52 minutes ago, Lippeth said:

And make sure to link the additional directory and dependencies to "zdoom" in VS.

I'm guessing this is the final piece of the puzzle. Where do I link these directories?

Share this post


Link to post


Edit: Don't click this unless you want the long and wrong way around.

Spoiler

 

In the solution explorer window, right click zdoom and select properties at the bottom. Then expand the "Linker" section and select "Input", then click the drop down arrow of "Additional Dependencies" at the top and click "<Edit...>", then type "fmodex64_vc.lib" under all the other .lib files and hit OK.

 

Then select "General" from the Linker section and click the drop down arrow of "Additional Library Directories" and click "<Edit...>", click the new folder icon, click the three dots to the right of the new field, and point it toward FMOD's lib folder. Click OK and you should be able to build without errors (and hopefully have sound!). Oh and don't forget to put the actual .dll file in the folder after building.

 

I only just learned all this the other day so I'm hardly qualified but I did build it just now and can confirm that it works and sound plays.

 

 

Edited by Lippeth

Share this post


Link to post

You don't need to change anything in VS, besides that's useless. Set the right folders in CMake to generate the solution.

Quote

 

set FMOD_INCLUDE_DIR to 'api/inc' folder inside folder where you installed fmod earlier (e.g. C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Windows\api\inc)

set FMOD_LIBRARY to 'api/lib/fmodex_vc.lib' inside fmod folder (e.g. C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Windows\api\lib\fmodex_vc.lib). If you are compiling for 64-bit systems set FMOD_LIBRARY to fmodex64_vc.lib instead.

 

 

Share this post


Link to post

Ah, that's probably why I had to do it in VS to avoid errors, I linked to the library folder in CMake, not the actual file.

 

Edit: Just had a massive revelation with using CMake in general after this convo, thanks so much drfrag!

 

Anyway, I hope you get it working, jmpt16!

Edited by Lippeth

Share this post


Link to post
15 hours ago, drfrag said:

You don't need to change anything in VS, besides that's useless. Set the right folders in CMake to generate the solution.

 

uber late response but is this it?

 image.png.7d569ebedbf03559878ea9f1bd005149.png
(yes, the files are actually in those folders)

Edited by jmpt16

Share this post


Link to post

ok now i'm getting this:
 

Cannot open include file: 'fmod.hpp': No such file or directory

 

Share this post


Link to post

The FMOD_INCLUDE_DIR should be only the include directory, without linking to any file (afaik, it works for me, anyway). Don't link to the actual dll, you'll later put that in the folder you build it in.

 

"C:/Program Files (x86)/FMOD SoundSystem/FMOD Programmers API Windows/api/inc"

Edited by Lippeth

Share this post


Link to post

 

Error	LNK1104	cannot open file 'C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Win64\api\lib\fmodex_vc.lib'

oh wait, forgot the 64

Edited by jmpt16

Share this post


Link to post
2 minutes ago, Lippeth said:

Did you put fmodex64.dll in the folder with zdoom.exe after building it?

613.jpg.e987b08e8fff9bf37a330b4dd995580f.jpg

 

Whatever, it's done. IT WORKS!!!!!
Thank you to everyone who helped!

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...