FPS Limiting, Triple Buffering, Batching Toggle, OpenAL HW

Feedback on past, current, and future development.
User avatar
FiftyTifty
Posts: 63
Joined: 15 Oct 2014, 21:02

FPS Limiting, Triple Buffering, Batching Toggle, OpenAL HW

Post by FiftyTifty »

After much lurking, I have returned. Infants shall cry, men shall scream and women weep.

Yeah, my body odour is quite bad. Got a cream for it, so we'll see how that goes.

*Achem*

Anyhow, got a couple of suggestions. Nothing that requires a page to get my point across; so without further ado...

1. An FPS limiter. For the times when VSync just won't cut it (such as, err, with current OpenMW framerates), capping the framerate to a particular number will do away with jitters caused by erratic framerates. As the project currently stands, it is literally a headache to just move your character around.

2. Triple Buffering. Seeing as how OpenMW doesn't support RadeonPro, an option to enable this for the D3D9 renderer would be welcome. The catalyst control center can force TB for OpenGL, but mayhaps also add this for OpenGL?

3. Surprisingly, OpenMW makes use of batching. Now, whether it uses dynamic or static batching, I don't know; my guess is that it uses dynamic batching due to the short render distances and cell (un)loading. Dynamic batching is costly in terms of performance, as it is performed every frame. A toggle for this would be appreciated; even if it actually worsens performance, perhaps it can be used as another variable in gauging performance on different hardware?

4. OpenAL hardware acceleration. Currently, OpenMW uses a software implementation of OpenAL, according to the main site. This is less than ideal, as the CPU is wastin' cycles. For those of us with dedicated soundcards, HW would indeed be a welcome boon.



Yep, that's about all I can think of at the mo.
BlueFootedBooby
Posts: 36
Joined: 15 Sep 2013, 16:00
Location: ...here?

Re: FPS Limiting, Triple Buffering, Batching Toggle, OpenAL

Post by BlueFootedBooby »

MajinCry wrote:...
4. OpenAL hardware acceleration. Currently, OpenMW uses a software implementation of OpenAL, according to the main site. This is less than ideal, as the CPU is wastin' cycles. For those of us with dedicated soundcards, HW would indeed be a welcome boon.

...
Serious question: Do dedicated soundcards these days even do anything beyond DAC and mixing channels together?

I ask because the last time I even considered getting a dedicated soundcard was around when Vista was released, right when that one hacker dude discovered that every one of the features Creative had been claiming old cards couldn't handle in Vista (most notably EAX) were actually done entirely in software. Since then I've pretty much assumed all sound cards were pointless without very specific needs (eg a bunch of separate line-ins for people who do audio work) and that the days of audio being a meaningful consumer of CPU time were over, but I realize I don't actually know.
User avatar
FiftyTifty
Posts: 63
Joined: 15 Oct 2014, 21:02

Re: FPS Limiting, Triple Buffering, Batching Toggle, OpenAL

Post by FiftyTifty »

BlueFootedBooby wrote:
Serious question: Do dedicated soundcards these days even do anything beyond DAC and mixing channels together?
They can indeed; the asio drivers are an absolute boon when using midi devices (~8 ms delay instead of 16-24 using Asio4All, or 80ms+ using Windows' default asio).

My particular card has a Crystalizer function, that has something to do with how compressed audio is handled; whatever it does, it makes everything sound better, from youtube videos to the radio in Fallout New Vegas.

Also, if you have a game that supports DirectSound (under XP) or uses HW accelerated OpenAL, it takes some burden off of your CPU; especially if heavily compressed files are used (.ogg, .xwm). You also get better quality sound (less muddy when multiple sounds are playing, better attenuation), when just changing your game from software to hardware. At least, when I have the options to compare; such as in Morrowind, Neverwinter Nights, Oblivion and Fallout 3.
BlueFootedBooby wrote: I ask because the last time I even considered getting a dedicated soundcard was around when Vista was released, right when that one hacker dude discovered that every one of the features Creative had been claiming old cards couldn't handle in Vista (most notably EAX) were actually done entirely in software. Since then I've pretty much assumed all sound cards were pointless without very specific needs (eg a bunch of separate line-ins for people who do audio work) and that the days of audio being a meaningful consumer of CPU time were over, but I realize I don't actually know.
I don't know about all that; I got my soundcard during 2012, a couple years after that spectacle.

What I do know, is that since most modern games use Xaudio2 (same audio library used on the Xbox 360), which is software accelerated; making a soundcard pretty pointless. But for the games that use OpenAL, you're gonna want that soundcard; better sound is gud.

You can also get a wrapper for creative soundcards that translates DirectSound calls to OpenAL, so whilst you won't get the performance boost (due to it being negated through the call interceptions), you'll still get better sound.
Chris
Posts: 1626
Joined: 04 Sep 2011, 08:33

Re: FPS Limiting, Triple Buffering, Batching Toggle, OpenAL

Post by Chris »

BlueFootedBooby wrote:Serious question: Do dedicated soundcards these days even do anything beyond DAC and mixing channels together?

I ask because the last time I even considered getting a dedicated soundcard was around when Vista was released, right when that one hacker dude discovered that every one of the features Creative had been claiming old cards couldn't handle in Vista (most notably EAX) were actually done entirely in software.
I'd be interested in where you heard this. I know there's some sound cards that did most processing in software (IIRC, Realtek did that), but AFAIK Creative actually did use hardware processing. Hardware mixing is pretty pointless if you have EAX processing in software since you need to mix before applying EAX.

Something to note is that, starting with Vista, Windows dropped hardware accelerated DirectSound. So even with Creative cards, DSound couldn't access hardware capabilities and you couldn't get EAX anymore that way. The only way to get EAX back is to use an OpenAL driver, and use a dsound.dll replacement that forwards to OpenAL. Older cards may not have had an OpenAL driver to allow hardware EAX.
4. OpenAL hardware acceleration. Currently, OpenMW uses a software implementation of OpenAL, according to the main site.
It should still work to use your hardware OpenAL driver. I don't know how the Windows release is packaged up, but the worst case is you can remove the provided OpenAL32.dll so it falls back to the system-installed (hardware) one.
You also get better quality sound (less muddy when multiple sounds are playing, better attenuation), when just changing your game from software to hardware. At least, when I have the options to compare; such as in Morrowind, Neverwinter Nights, Oblivion and Fallout 3.
Something to note is that those games were made when hardware accelerated audio was still "a thing", so there was less work put into the software fallback as it could be assumed anyone really interested in audio would have the hardware for it. Though since dedicated soundcards have fallen out of favor, more recent software audio processing libraries have been improved to make much better use of modern CPU capabilities and provide better sound than what was done 7+ years ago.

Not to say proper hardware processing can't or won't still be better, but software solutions today are better than software solutions of previous decades in terms of features, quality, and performance.
User avatar
FiftyTifty
Posts: 63
Joined: 15 Oct 2014, 21:02

Re: FPS Limiting, Triple Buffering, Batching Toggle, OpenAL

Post by FiftyTifty »

Chris wrote: It should still work to use your hardware OpenAL driver. I don't know how the Windows release is packaged up, but the worst case is you can remove the provided OpenAL32.dll so it falls back to the system-installed (hardware) one.
That's the thing; there is a redistributable that installs the OpenAL drivers (I had OpenAL installed alongside my Creative Drivers), yet it still uses software audio.

Lil' snippet from my log file:
Sound output: OpenAL
Sound decoder: FFmpeg
Enumerated output devices:
Generic Software on Speakers (Creative SB X-Fi)
Generic Software on SPDIF Out (Creative SB X-Fi)
Generic Software on Headphones (High Definition Audio Device)
Generic Software on Digital Audio (S/PDIF) (High Definition Audio Device)
Opened "Generic Software on Speakers (Creative SB X-Fi)"
So yeah; HW acceleration would be nice. Worst case scenario? It frees up CPU cycles. Morrowind isn't too heavy with sounds (unless you're near more than five NPCs, give or take), but it allows for the possibility of chucking in many more sounds.

'Tis also a good engine feature in general.
Chris
Posts: 1626
Joined: 04 Sep 2011, 08:33

Re: FPS Limiting, Triple Buffering, Batching Toggle, OpenAL

Post by Chris »

MajinCry wrote:That's the thing; there is a redistributable that installs the OpenAL drivers (I had OpenAL installed alongside my Creative Drivers), yet it still uses software audio.

Lil' snippet from my log file:
Sound output: OpenAL
Sound decoder: FFmpeg
Enumerated output devices:
Generic Software on Speakers (Creative SB X-Fi)
Generic Software on SPDIF Out (Creative SB X-Fi)
Generic Software on Headphones (High Definition Audio Device)
Generic Software on Digital Audio (S/PDIF) (High Definition Audio Device)
Opened "Generic Software on Speakers (Creative SB X-Fi)"
Are you running the 32-bit or 64-bit version of OpenMW? If you've installed the drivers correctly, and you're sure nothing else is interfering, it should detect the hardware OpenAL driver as long as it's for the matching 32-bit or 64-bit architecture.
User avatar
FiftyTifty
Posts: 63
Joined: 15 Oct 2014, 21:02

Re: FPS Limiting, Triple Buffering, Batching Toggle, OpenAL

Post by FiftyTifty »

Chris wrote: Are you running the 32-bit or 64-bit version of OpenMW? If you've installed the drivers correctly, and you're sure nothing else is interfering, it should detect the hardware OpenAL driver as long as it's for the matching 32-bit or 64-bit architecture.
I'm using the 64 bit version, and am using the 64 bit drivers for my sound card. Also instaled the OpenAL redistributable packaged with OpenMW, as well as the one provided by the OpenAL website.

Lil' question. Does your log show hardware accelerated OpenAL being used?
Chris
Posts: 1626
Joined: 04 Sep 2011, 08:33

Re: FPS Limiting, Triple Buffering, Batching Toggle, OpenAL

Post by Chris »

MajinCry wrote:Lil' question. Does your log show hardware accelerated OpenAL being used?
I don't have hardware accelerated OpenAL. Even if I had an audio card (as opposed to an embedded chipset), there's no hardware Linux drivers.

What I'd do now is check your windows\system32 and windows\syswow64 folders for ct_oal.dll. For a 64-bit OS, the 64-bit driver would be in windows\system32 while the 32-bit driver would be in windows\syswow64 (never could make a sensible naming scheme could you, Windows).
User avatar
FiftyTifty
Posts: 63
Joined: 15 Oct 2014, 21:02

Re: FPS Limiting, Triple Buffering, Batching Toggle, OpenAL

Post by FiftyTifty »

Chris wrote:
MajinCry wrote:Lil' question. Does your log show hardware accelerated OpenAL being used?
I don't have hardware accelerated OpenAL. Even if I had an audio card (as opposed to an embedded chipset), there's no hardware Linux drivers.

What I'd do now is check your windows\system32 and windows\syswow64 folders for ct_oal.dll. For a 64-bit OS, the 64-bit driver would be in windows\system32 while the 32-bit driver would be in windows\syswow64 (never could make a sensible naming scheme could you, Windows).
You'd think that the 64bit variant of system32 would be system64. Must have seemed like a good idea at the time.

I've got the 64bit version of that .dll, but not the 32 bit. Guess I'll bugger around with unpacking the 32bit version of the driver installer.

Edit: Got that the wrong way 'round; I DO have the 32 bit version, but not the 64 bit one.
User avatar
psi29a
Posts: 5362
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: FPS Limiting, Triple Buffering, Batching Toggle, OpenAL

Post by psi29a »

MajinCry wrote:Edit: Got that the wrong way 'round; I DO have the 32 bit version, but not the 64 bit one.
And? :D
Post Reply