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

0 Members and 1 Guest are viewing this topic.

Offline galneon

  • 20
Re: The state of audio (OpenAL) in FreeSpace 2 Open
I'm glad to see a thread like this here, and stickied no less.  I searched for a thread like this so I could create one extolling the virtues of OpenAL if one didn't already exist.  It gets a lot of flak, especially from developers trying to justify their use of inferior, but easier to implement, solutions like FMOD and Xaudio2, which are abominable in terms of positioning and realism but highly portable.

OpenAL Soft was updated last year to implement HRTF (head-related transfer function) support.  This results in headphones giving the wearer the impression that sounds are coming from in front of, behind, above, and under the user (and of course to the sides).  It works by simulating two microphones placed in the ears with all the dampening of sounds based on the shape of the ears and head that that would entail.  Basically, it emulates how people actually hear and how they process sounds from all directions with only two eardrums.  You can find HRTF demos on YouTube and they will work with stereo headphones of any quality.  I recommend listening to this one with headphones (and closed eyes):

http://www.youtube.com/watch?v=IUDTlvagjJA

I used OpenAL Soft for headphones and for discrete 7.1 surround until I finally purchased Rapture3D.  It features HRTF (and other things) as well as "tinted reconstruction" which attempts to adapt HRTF to stereo, quadraphonic, 5.1, 7.1, etc. speaker setups to simulate some of the improved directional perceptions of HRTF (such as sounds coming from above and below the listener).  It also comes with more HRTF presets than OpenAL Soft, which can be important as certain HRTF datasets will mesh better with certain people for the simple reason that we all have different ear and head shapes.

Some games that have extraordinarily impressive positional audio via OpenAL that almost no one knows about (and none of these require a physical soundcard as I use HDMI or an onboard Realtek chip depending on what PC I'm on):

Thief: Gold
Thief 2
System Shock 2
S.T.A.L.K.E.R. Series (Clear Sky and Call of Pripyat are especially impressive)
Unreal Tournament 3
And of course FreeSpace Open

There are more.  These are the ones I've most recently enjoyed on both Windows 7 and 8.1.

Please don't dismiss OpenAL just because Creative bought and then attempted to bury it just like they did Aureal3D.  Unlike A3D, OpenAL is still under development, most notably by the OpenAL Soft developer(s) and the Rapture3D developer.  Most developers spend almost no time working on their engine's audio, but almost any game with OpenAL support has serious potential that can be unleashed using the right methods.  FMOD/wwise/XAudio2 may still be the future because developers find them so easy to work with and port, but it's a bleak one.  Anyone with a good reference point for positional audio who has played any triple AAA titles in the last 5+ years knows this :/

 
Re: The state of audio (OpenAL) in FreeSpace 2 Open
On my system the audio would often clip or get distorted in intense battles and especially during explosions. Using OpenAL Soft instead of the default OpenAL from Creative seems to fix this.

About HRTF, I've tried it with a couple of games now (FS2 included) and for some reason it makes everything sound a bit thin. Sort of like having everything run through a high-pass filter and taking out a good chunk of bass in the process. Other than that it works pretty well.

 

Offline Jackho

  • 26
  • Gnoti seauton ...
    • Downloads an al
Re: The state of audio (OpenAL) in FreeSpace 2 Open
Hi,

Haha! I'm glad I'd be curious enough to find this thread about sound while i'm searching for something else  :lol:
Now I finally got 5.1 sound placement after years of stereo in freespace. Good news!

A+
Jack H. : "Well... There's much more to check than six..."

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem, but under Tiger Parents
    • Skype
    • Steam
    • Twitter
Re: The state of audio (OpenAL) in FreeSpace 2 Open
Excuse me, I have something to tell you.

3D sounds usually have only one channel, that is mono. Nowadays, in most modern games, 3D sounds have more than one channel, I presume. So, this warning at sound.cpp, line 354 needs to be changed.
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Full Projects:
Shattered Stars

Campaigns:
Lost in the Mist - Cyrene vs. Psamtik
FreeSpace: Reunited

Ships:
GTS Hygeia, GTT Argo, SC Raguel

Tools:
FSO TC/Game template

I've been under attack by Tiger Parents like Jennifer Pan...

 

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
Excuse me, I have something to tell you.

3D sounds usually have only one channel, that is mono. Nowadays, in most modern games, 3D sounds have more than one channel, I presume. So, this warning at sound.cpp, line 354 needs to be changed.

No, it doesn't. Your presumption is wrong and based on an invalid interpretation of what a "3D sound" in FSO is.
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

 
Re: The state of audio (OpenAL) in FreeSpace 2 Open
So this is old, but it's Google's most recommended hit for surround sound in the game.
I'm just going to say I'm dumb and I don't understand, but maybe also things have changed slightly since this was released? Is there an easier step by step guide? Or an updated one now that both the OpenAL soft and FSO have been updated? I'm just really unsure of how or what to do with the various 32 bit and 64 bit files and where to put them. I don't want to just monkey around with things and break stuff.

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: The state of audio (OpenAL) in FreeSpace 2 Open
So this is old, but it's Google's most recommended hit for surround sound in the game.
I'm just going to say I'm dumb and I don't understand, but maybe also things have changed slightly since this was released? Is there an easier step by step guide? Or an updated one now that both the OpenAL soft and FSO have been updated? I'm just really unsure of how or what to do with the various 32 bit and 64 bit files and where to put them. I don't want to just monkey around with things and break stuff.

IIRC, You'll need the 32-bit .dll in the wxLauncher directory and the 64-bit in the FS2 directory (unless you're using a 32-bit FSO, in which case, just a 32-bit in the FSO directory will do fine).  There may be a specific subdirectory you're supposed to put it in.  Hop on the HLP Discord server and ask.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: The state of audio (OpenAL) in FreeSpace 2 Open
Current nightly builds include the OpenAL Soft DLL so it doesn't require any effort on the user's part.
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 jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: The state of audio (OpenAL) in FreeSpace 2 Open
Current nightly builds include the OpenAL Soft DLL so it doesn't require any effort on the user's part.

Would just need a 32-bit in the wxLauncher folder then, right? (if the FSO build was 64-bit anyways)

 
Re: The state of audio (OpenAL) in FreeSpace 2 Open
Just to throw my $0.02 in here, I can second everything Galneon said - I own a copy of Rapture3D "User" - bought it for $50(?) and it works w/ most OpenAL apps (not all, though - it worked with FS Open last I checked a few years ago). It continues to receive updates from Blue Ripple Sound (for free - buy once, get updates forever) and its HRTFs are, at least to my ears, the best 3D sound I've ever heard. I recommend using open-back headphones such as the Audio-Technica ATH-AD900X; closed-backs may sound muffled.

edit: For games which support 7.1 but not OpenAL, Razer Surround _kinda_ works but sounds inferior and in my exp. is laggy and glitchy (often turns itself off)

edit2: Can confirm putting 32bit in wxlauncher dir and 64-bit dll in FSO dir seems to be the way to go for any 3rd party OAL https://www.hard-light.net/forums/index.php?topic=94134.0
« Last Edit: December 26, 2017, 10:32:11 am by Gregster2k »

 

Offline LazPL

  • 22
Re: The state of audio (OpenAL) in FreeSpace 2 Open
How can I force a specific sound device to be used? In my fresh FSO install (Knossos) on my fresh new laptop, the sound is disregarding whatever sound device is selected in windows, it only comes out of the laptop speakers. It also disregards the windows volume settings... All I can do is mute the sound completely.
I guess I have whatever OpenAL version Knossos installed.
Any ideas?
Thanks!
Any ideas?

 

Offline Antares

  • 28
  • Author of The Shivan Manifesto
Re: The state of audio (OpenAL) in FreeSpace 2 Open
You should be able to select your preferred playback device in the settings window, under the Audio menu.
We have returned to continue our purification of this galaxy. It is again your turn to be crushed beneath the great force that is the Antaran army. All your petty squabbling with the other beings in this galaxy is meaningless. The Antaran fleet will destroy you all, one by one. You may not surrender. You cannot win. Your only option is death.

 

Offline LazPL

  • 22
Re: The state of audio (OpenAL) in FreeSpace 2 Open
You should be able to select your preferred playback device in the settings window, under the Audio menu.
Thanks Antares, but that's precisely the problem - The selected audio output setting is ignored by FSO, whatever device I have connected, whether wired or Bluetooth, and whatever device is selected in Windows when I launch Knossos, the FSO sound will come through the laptop speakers - and what is more, the volume settings are also ignored - as they're controlling the selected output device, which is not the same as the one FSO is using. Really strange. This doesn't happen with any other software. Thanks for any ideas!

 

Offline LazPL

  • 22
Re: The state of audio (OpenAL) in FreeSpace 2 Open
I just realized that I could set the preferred audio output device in Knossos - and that it overrides whatever Windows is set to use... So, problem solved! My bad, sorry...