Author Topic: The state of audio (OpenAL) in FreeSpace 2 Open  (Read 49443 times)

0 Members and 1 Guest are viewing this topic.

Offline Fury

  • The Curmudgeon
  • 213
The state of audio (OpenAL) in FreeSpace 2 Open
OpenAL is what FreeSpace 2 Open (FSO) uses as its audio subsystem to bring all those sounds and music out of your speakers or headphones. OpenAL is used because it is mature cross-platform audio API. In that department there are no serious alternatives to OpenAL.

When most people here mention OpenAL, they are usually referring to what is Creative's OpenAL. In the beginning it used to be open-source API (hence the name) but when Creative acquired it, they changed its license to proprietary. They kept binary downloads free for everyone though. Up until little over a month ago when Creative's site hosting OpenAL went down and it hasn't come back since.

But make note that Creative never once updated OpenAL since it was acquired, which happened back in 2005. Which would make Creative's OpenAL 8 years old now. Creative has included OpenAL drivers in their brand sound cards, but obviously those haven't been available for everyone nor is it guaranteed that they work in anything but Creative cards.

Considering the sorry state of OpenAL, how are we seeing OpenAL mentioned in launch screens in various video games? That's because Creative's implementation is not the only OpenAL out there. Remember that OpenAL used to be open-source before it was acquired by Creative? Some people made use of that and spinned their own updated versions of OpenAL. Many of them became proprietary and commercial, such as Rapture3D which I am sure you have seen in video game launch screens if you have paid any attention.

But no worries, there are free, open-source alternatives. Namely OpenAL Soft. Getting it is easy too, just three (or four) steps.

Go to http://kcat.strangesoft.net/openal.html
Download the binary package, the one that ends in -bin.zip. Which is at the time of writing this, openal-soft-1.15.1-bin.zip.
From the zip, extract Win32\soft_oal.dll to your FreeSpace 2 folder and rename it to OpenAL32.dll.
You might need to have known file extensions visible, so that your OpenAL32.dll won't have double extension by accident. Microsoft instructs how you can show known file extensions.

In case you had FSO already running, close it and then launch it again. If you don't notice any difference to Creative's OpenAL or if OpenAL Soft works better for you, do yourself a favor and uninstall Creative's OpenAL from Control Panel's Programs and Features, it's listed as OpenAL. If after this point FSO starts complaining about missing OpenAL, then you did not install OpenAL Soft correctly and FSO was using Creative's OpenAL up until it was uninstalled.

Should OpenAL Soft perform worse than Creative's OpenAL (which is highly unlikely), you can rename or delete the OpenAL32.dll in your FreeSpace 2 folder. Then you're back using Creative's OpenAL.

In my experience OpenAL Soft has fixed various problems, even some that weren't readily associated with audio. As such it would be greatly appreciated if you give OpenAL a chance, even if you don't have any audio problems.

Obviously this post concerns only people who use Windows. Linux folks already use OpenAL Soft and OS X folks have Apple's version of OpenAL.
« Last Edit: September 22, 2013, 02:59:03 pm by Fury »

 

Offline Kolgena

  • 211
Re: The state of audio (OpenAL) in FreeSpace 2 Open
What sort of things are you talking about when you say oal soft works better? Sound effects/3D positioning? Stuttering/popping? sound engine performance?

Just so I know what to look for when testing.

 

Offline Fury

  • The Curmudgeon
  • 213
Re: The state of audio (OpenAL) in FreeSpace 2 Open
That would vary depending on sound card or chip and drivers, so I can't say what your experience will be. In my experience though there has been sometimes differences in how the two handle positional audio which might be the only difference you'll notice if you haven't had any issues with Creative's, but which is better may be subjective. Find out what differences you have (if any) by trying OpenAL Soft, no other way around it.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: The state of audio (OpenAL) in FreeSpace 2 Open
Stickied for reference
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Kolgena

  • 211
Re: The state of audio (OpenAL) in FreeSpace 2 Open
At least for me, popping sounds (ubiquitous throughout briefing voice files) is gone, and 3D positional audio in 5.1 is actually working reasonably well now! Except, beams still have really weird sound effects, and I can't localize them well based on only sound.

Oddly enough, I can't find creative's openal on my computer. It's not in the list of programs, and I can't find it in my program files directories.
« Last Edit: October 12, 2013, 05:04:15 am by Kolgena »

 

Offline Fury

  • The Curmudgeon
  • 213
Re: The state of audio (OpenAL) in FreeSpace 2 Open
The dll is installed to your System32 or SysWOW64 directory under Windows directory. However, you should run regsvr32 -u OpenAL32.dll in command prompt before you delete the file, if that is your intention.
« Last Edit: February 01, 2014, 12:44:47 am by Fury »

 

Offline Kolgena

  • 211
Re: The state of audio (OpenAL) in FreeSpace 2 Open
The module "OpenAL32.dll" was loaded but the entry-point DllUnregisterServer was not found.

That's no good. wtf happend to my oal install?

Will it work to delete the dll then use something like ccleaner to remove its registry entries?
« Last Edit: October 12, 2013, 02:37:02 pm by Kolgena »

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: The state of audio (OpenAL) in FreeSpace 2 Open
Nothing happened. Openal does not install any handlers via regserv.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline FIZ

  • 26
Re: The state of audio (OpenAL) in FreeSpace 2 Open
This solved a long ongoing bug for me.  When playing any campaign, I would lose VA (even retail campaign) and music after a mission or two.  Cool find.  :yes:

 
Re: The state of audio (OpenAL) in FreeSpace 2 Open
Surprisingly I had more problems with this new OpenAL32.dll than with the old Creative's OpenAL. Here is what happened:

- I downloaded the binary package and then extracted and renamed win32\soft_oal.dll into Freespace 2\OpenAL32.dll
- I removed "Open AL" from the Windows 7 x64's "programs and features"
- Now the wxLauncher cannot find OpenAL! I cannot change any audio options, like sample rate or playback device.
- However it lets me to start the game, and from the log file I can verify that it DID indeed load the new openal32.dll:

Code: [Select]
Initializing OpenAL...
  OpenAL Vendor     : OpenAL Community
  OpenAL Renderer   : OpenAL Soft
  OpenAL Version    : 1.1 ALSOFT 1.15.1

  Found extension "AL_EXT_float32".
  Found extension "ALC_EXT_EFX".

  Sample rate: 48000 (48000)
  EFX enabled: NO
  Playback device: Speakers (ASUS Xonar Essence STX Audio Device)
  Capture device: Microphone (ASUS Xonar Essence STX Audio Device)
... OpenAL successfully initialized!

- The game seems to start nicely, but then I discover a bug that wasn't there before. I get this "pof" sound every time I change pages in the "Briefing screen" with narrated audio. You know, that screen which contains news and stuff, not the tactical map.

- Also one of the old annoyances remain: DPC latency spikes. In tutorial mission, if I just fly around without any afterburners (and without any background noices altogether), i get this quiet popping sound every few seconds from my humming engines (looping sound file). It might be because of my sound card. Man I should just switch to Unixonar drivers since these official ones have given problems at least 1-2 games, id software's RAGE was probably the worst.

BTW this is the program that enables to analyze DPC Latency: http://www.thesycon.de/deu/latency_check.shtml

So, I guess I should go back to the old version of OpenAL for now.

 

Offline Fury

  • The Curmudgeon
  • 213
Re: The state of audio (OpenAL) in FreeSpace 2 Open
- Now the wxLauncher cannot find OpenAL! I cannot change any audio options, like sample rate or playback device.
That's because wxLauncher doesn't know to look for it in the FSO dir. It can look for it in any dir in system path or in its own dir. If you use wxLauncher, you have following options:
- Instead of using FSO dir, put the dll file to any of the directories included in system path.
- Add FSO dir to your system path.

I might add that the old launcher wouldn't have this problem as it is stand-alone executable residing in FSO dir.
« Last Edit: December 04, 2013, 01:58:43 pm by Fury »

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: The state of audio (OpenAL) in FreeSpace 2 Open
- Now the wxLauncher cannot find OpenAL! I cannot change any audio options, like sample rate or playback device.
That's because wxLauncher doesn't know to look for it in the FSO dir. It can look for it in any dir in system path or in its own dir. If you use wxLauncher, you have following options:
- Instead of using FSO dir, put the dll file to any of the directories included in system path.
- Add FSO dir to your system path.
Couldn't you also just copy the .dll to the wxLauncher folder, instead of (*shudder*) making your FSO folder a system path?
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline Fury

  • The Curmudgeon
  • 213
Re: The state of audio (OpenAL) in FreeSpace 2 Open
You can, but then you would need to remember to keep the dll in not one, but two dirs. Be easier if you just copy the file to any of the dirs in system path, like system32. Or syswow64 if you're on 64-bit Windows. Or just add FSO to system path, nothing wrong with that. A lot of **** gets added to the path variable already, just go look at yours.

And of course, this is only up until SCP gets around to bundle OpenAL Soft in the executable instead of relying on external linking. But since wxLauncher wouldn't know that either, it also needs to bundle the dll either externally or within the executable.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: The state of audio (OpenAL) in FreeSpace 2 Open
Or just add FSO to system path, nothing wrong with that. A lot of **** gets added to the path variable already, just go look at yours.
I keep my PATH variable carefully pruned, thank you very much.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline iVoid

  • 26
Re: The state of audio (OpenAL) in FreeSpace 2 Open
Thanks for this, it even helps to make FSO portable, which is nice. Couple questions:

Can I use the x64 binaries if I have a 64bit OS?

And can I use the libraries included in this package to compile FSO instead of the ones from creative? If so, is there any advantage to that?
« Last Edit: January 11, 2014, 10:17:38 am by iVoid »

 
Re: The state of audio (OpenAL) in FreeSpace 2 Open
Ok, I have now read my eyes sore on forum posts trying to get my audio to work in FSO. And found no sollution that works, openal is starting to become a nightmare. This is time I should be spending playing instead of trying to fix long known errors. But here it is, I manage to get openal installed, verified and then I run FSO. It detects openal, but find no audio devices, I have no less than 5 of those. 2 monitors, 1 onboard and 2 USB devices capable of playing sound (headset, speaker). It might be me being overly tirred, but right now I feel more like doing this  :banghead: than playing any games. And for the love of the Gods one CAPTCHA is enough damned it.

 

Offline Shivan Hunter

  • 210
  • FRED needs lambdas!
Re: The state of audio (OpenAL) in FreeSpace 2 Open
Run a debug build (just start the game and exit, that should tell us what we need), copy the contents of freespace2/data/fs2_open.log, put it on pastebin.com, and we may be able to tell you what's wrong.

"one CAPTCHA is enough damned it"

Yeah we get a lot of spam, I think it goes away after you have a few posts.

 

Offline Kolgena

  • 211
Re: The state of audio (OpenAL) in FreeSpace 2 Open
Ok, I have now read my eyes sore on forum posts trying to get my audio to work in FSO. And found no sollution that works, openal is starting to become a nightmare. This is time I should be spending playing instead of trying to fix long known errors. But here it is, I manage to get openal installed, verified and then I run FSO. It detects openal, but find no audio devices, I have no less than 5 of those. 2 monitors, 1 onboard and 2 USB devices capable of playing sound (headset, speaker). It might be me being overly tirred, but right now I feel more like doing this  :banghead: than playing any games. And for the love of the Gods one CAPTCHA is enough damned it.

OpenAL soft currently doesn't work with wxlauncher for me. You might have the same problem? (Win 8.0) Try the super old creative OpenAL that we were using before Fury recommended OpenAL soft.

 

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
Re: The state of audio (OpenAL) in FreeSpace 2 Open
Talking about sound - this video portrays the most egregious audio problem currently plaguing FS2 Open:



Is there any way to resolve the sound source positioning in some more elegant way than just switching from right to left...?
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.

 
Re: The state of audio (OpenAL) in FreeSpace 2 Open
Go to http://kcat.strangesoft.net/openal.html
Download the binary package, the one that ends in -bin.zip. Which is at the time of writing this, openal-soft-1.15.1-bin.zip.
From the zip, extract Win32\soft_oal.dll to your FreeSpace 2 folder and rename it to OpenAL32.dll.
You might need to have known file extensions visible, so that your OpenAL32.dll won't have double extension by accident. Microsoft instructs how you can show known file extensions.

In case you had FSO already running, close it and then launch it again.

When I did this, I could no longer get rearmed by the Support ship. It would warp in and approach me, but then it would seem to get lost at about a couple hundred meters away and it would just sit there doing nothing as though it can't find me. It would follow me around if I started to move again, but it would never get any closer than a couple hundred meters. As soon as I deleted it, everything was fine.

Has anyone else experienced this? I'd like to fix it because I did notice a subtle improvement (but it could also be the placebo effect).
Why do you say "as" instead of "because"?