ZDoom with OpenAL

Like feature suggestions, but you've actually written code to make it happen. More likely to make it into the game than some random request in feature suggestions.

Moderator: Developers

Re: ZDoom with OpenAL

Postby Aroenai » Fri Aug 13, 2010 2:00 am

Success! After generating a new project with cmake for vs2008 and some trickery to prevent the missing ddraw.lib (June 2010 sdk) from being added... it compiles, but now I need to find python26.dll to see if openal actually works.

EDIT: found a copy of python26.dll and zdoom crashes when you try and move the cursor on the main menu.
Last edited by Aroenai on Fri Aug 13, 2010 2:15 am, edited 1 time in total.
Aroenai
 
Joined: 27 Jul 2010

Re: ZDoom with OpenAL

Postby Chris » Fri Aug 13, 2010 2:07 am

Aroenai wrote:
Code: Select allExpand view
@@ -706,7 +708,7 @@
 
    if (!ShowedBanner)
    {
-      Printf("FMOD Sound System, copyright ɠFirelight Technologies Pty, Ltd., 1994-2009.\n");
+      Printf("FMOD Sound System, copyright © Firelight Technologies Pty, Ltd., 1994-2009.\n");
       Printf("Loaded FMOD version %x.%02x.%02x\n", version >> 16, (version >> 8) & 255, version & 255);
       ShowedBanner = true;
    }


That part causes problems for me in all the patches he posts, I always have to delete it for the patch to apply. Hope that helps Graf ;)

Okay, I got that change edited out. My text editors prefer UTF-8, so non-UTF-8 extended chars tend to get messed up.
User avatar
Chris
... the Chris guy...
 
Joined: 17 Jul 2003

Re: ZDoom with OpenAL

Postby Graf Zahl » Fri Aug 13, 2010 2:10 am

It's too bad that most C compilers don't. That would make life a lot easier...
User avatar
Graf Zahl
 
Joined: 19 Jul 2003
Location: Germany

Re: ZDoom with OpenAL

Postby Chris » Sat Aug 14, 2010 3:46 pm

FWIW, it seems GZDoom's root CMakeLists.txt uses different line-endings than ZDoom's, and src/CMakeLists.txt has a different ordering of entries of the commands
Code: Select allExpand view
# Libraries ZDoom needs

set( ZDOOM_LIBS ${ZDOOM_LIBS} "${ZLIB_LIBRARIES}" "${JPEG_LIBRARIES}" "${BZIP2_LIBRARIES}" "${FMOD_LIBRARY}" )
include_directories( "${ZLIB_INCLUDE_DIR}" "${FMOD_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${JPEG_INCLUDE_DIR}" )

That's been making it difficult to make a patch with one that will apply with the other, without manual editing.
User avatar
Chris
... the Chris guy...
 
Joined: 17 Jul 2003

Re: ZDoom with OpenAL

Postby Aroenai » Sat Aug 14, 2010 4:11 pm

Hey Chris, does zdoom crash for you when you find a secret area on Linux with OpenAL? I'm using Ubuntu 10.04 with OpenAL Soft compiled from git and the plugin for gstreamer you mentioned earlier ("./configure && make && sudo make install" right?). Still can't get the Windows build to work even though it compiles fine either.
Aroenai
 
Joined: 27 Jul 2010

Re: ZDoom with OpenAL

Postby Chris » Sat Aug 14, 2010 5:24 pm

Aroenai wrote:Hey Chris, does zdoom crash for you when you find a secret area on Linux with OpenAL?

It will crash if it builds with FMOD support too, because FMOD includes a bunch of standard libs built-in, with some modifications apparently, and leaves their symbols exposed so GStreamer and its plugins end up unexpectedly calling FMOD's functions and causes a crash. You can run cmake with -DNO_FMOD to disable FMOD support. This isn't an issue in Windows, BTW, because a module will load symbols only from a specific DLL, determined at link time.

I'm still looking at ways to resolve this. If FMOD can be loaded with the RTLD_LOCAL flag, it may prevent other libraries from seeing its symbols (if I'm understanding the man page correctly), but that has a problem: it's a flag for dlopen, and FMOD is linked on the command like, so dlopen flags aren't strictly available. I'm checking around to see if there's a way to specify that for the linker so ld will do it automatically. There is also the RTLD_NOLOAD flag for dlopen, which can be used to effectively modify a loaded lib's locality, but it's not standard and the FMOD lib name needs to be known by the code. I'll see what I can come up with.

Still can't get the Windows build to work even though it compiles fine either.

What problems are you having? Not initializing, crashing, or something else? If it's crashing, can you provide a backtrace?
User avatar
Chris
... the Chris guy...
 
Joined: 17 Jul 2003

Re: ZDoom with OpenAL

Postby Aroenai » Sat Aug 14, 2010 7:19 pm

Well, when it crashes it won't give any sort of error message, you just get the useless Windows error saying zdoom.exe has stopped working blah blah and it automatically closes. It does this in two spots, when you select openal and restart sound or when you select openal, exit, start zdoom and then press any key to bring up the menu (music plays fine, until that point). I'm still really new to this stuff, so I don't know how to do a backtrace, I'm assuming using the Debug build, but that would mean I'd have to compile all new libraries (problematic since I couldn't figure out how to compile gstreamer so I downloaded an SDK with Win32 builds from http://code.google.com/p/ossbuild/ )
Aroenai
 
Joined: 27 Jul 2010

Re: ZDoom with OpenAL

Postby Chris » Sat Aug 14, 2010 8:06 pm

Aroenai wrote:I'm still really new to this stuff, so I don't know how to do a backtrace, I'm assuming using the Debug build, but that would mean I'd have to compile all new libraries (problematic since I couldn't figure out how to compile gstreamer so I downloaded an SDK with Win32 builds from http://code.google.com/p/ossbuild/ )

You could start simply by building ZDoom in debug mode. If the crash is happening in my/ZDoom code, you should be able to get the necessary information, and even if it's not happening in ZDoom code, sometimes you can get some useful information. VC has a built-in debugger (make sure to run ZDoom in windowed mode), but I'm not familiar with using it.
User avatar
Chris
... the Chris guy...
 
Joined: 17 Jul 2003

Re: ZDoom with OpenAL

Postby Chris » Wed Sep 15, 2010 4:49 am

Updated to r2778, to deal with the new menu code. A bit troublesome how the menu code determines if an option set is numeric- or string-based depending on if the first entry's string value is empty or not.. took me a while to find that out, and it prevents me from making the default device be represented by an empty CVar string.

As for the code, it should mostly be functionaly similar to before. The only noteable difference is that both OpenAL and FMOD options are available in the menu even if they're disabled at compile-time. I'm not sure the best way to go about handling that, since menudef isn't flexible enough (even if I added a couple new IfOption() filters to hide the OpenAL/FMOD sub-menus, I'd need either an Else or an IfNotOption() filter to make it use a proper backend list; unless I fill it in at run-time like the MIDI device list).
Attachments
oal-patch-r2778.zip
(30.15 KiB) Downloaded 54 times
User avatar
Chris
... the Chris guy...
 
Joined: 17 Jul 2003

Re: ZDoom with OpenAL

Postby Graf Zahl » Wed Sep 15, 2010 5:45 am

Can you please redo the patch with the newly synchronized branch? It's not a good idea to merge trunk changes via external patches because they'd lose all versioning history that way.
User avatar
Graf Zahl
 
Joined: 19 Jul 2003
Location: Germany

Re: ZDoom with OpenAL

Postby Chris » Wed Sep 15, 2010 7:38 am

Graf Zahl wrote:Can you please redo the patch with the newly synchronized branch?

I'm a bit clueless with using SVN like this. The openal branch doesn't seem to be in sync with trunk, and I don't know how to make it so (let alone produce a good patch).
User avatar
Chris
... the Chris guy...
 
Joined: 17 Jul 2003

Re: ZDoom with OpenAL

Postby Graf Zahl » Wed Sep 15, 2010 7:38 am

I just synced it. It just took a little time.

Anyway, please post patches against the OpenAL branch in the future. The one you posted was against the trunk so it was not usable. And if you need synchronizing with the trunk just drop a message so that someone with access can do it.
User avatar
Graf Zahl
 
Joined: 19 Jul 2003
Location: Germany

Re: ZDoom with OpenAL

Postby Gez » Wed Sep 15, 2010 8:15 am

You can use the SVN switch command to change your local copy of the repository from the trunk to a branch (or vice-versa).
http://svnbook.red-bean.com/en/1.0/re27.html
Gez
 
Joined: 06 Jul 2007

Re: ZDoom with OpenAL

Postby Chris » Wed Sep 15, 2010 8:27 am

Okay, this patch is against the openal branch.
Attachments
oal-patch-r2780.zip
(7.07 KiB) Downloaded 56 times
User avatar
Chris
... the Chris guy...
 
Joined: 17 Jul 2003

Re: ZDoom with OpenAL

Postby Graf Zahl » Wed Sep 15, 2010 8:45 am

added.
User avatar
Graf Zahl
 
Joined: 19 Jul 2003
Location: Germany

PreviousNext

Return to Code submissions

Who is online

Users browsing this forum: No registered users and 0 guests