Jump to content
The Dark Mod Forums

Minimum volume cap for directional sounds


MirceaKitsune

Recommended Posts

I'm coming across a little annoyance periodically, which I'm sure nearly every player can confirm and at least partly agree on. When playing TDM on headphones, directional audio does not set a minimum volume for the ear opposite of the source. This means that when a sound source is to your left, you hear it entirely in the left ear... and if it's to the right only in the right ear.

 

The first problem with this is that it's very irking for the player... to the point where I often have to look in a certain direction just to avoid noise in one ear and complete silence in the other. It's the same as trying to listen to music on one headphone only: It has an uncomfortable and unnatural effect on the brain and you feel tempted to press the stop button immediately. An additional issue is realism: If someone is standing to your left and talking toward you, you will of course hear them a bit more clearly with your left ear, but you'll also hear them with the right ear somewhat.

 

My suggestion is a new menu setting in the Audio panel, which allows us to configure a minimum volume that a sound can be reduced to by its direction alone. This would allow everyone to set it based on what feels most comfortable to each person, as well as what type of headphones they are using. It should only need to be a small value for comfort... something like 0.05 or 0.1 volume when the sound is coming directly away from that ear.

 

I know that directional sound is very important from a gameplay perspective; Players often use it to listen to a guard's footsteps or idle ramblings and know where they're coming from. This is why I'm suggesting a small minimum cap enough so it doesn't irk the ear, or at least having an option players can enable themselves even if it's off by default. Till then, is there already a cvar for this in the settings by chance?

Link to comment
Share on other sites

I don't think it should be a menu option. If this is really a matter of the sound being all in one ear and nothing in the other, then it should be fixed in code.

 

I do believe there should be a setting for it at least so everyone can customize it. 0 disables the min volume cap (current behavior), 1 disables directional sound entirely (volume only drops with distance not orientation, not sure who'd want that) but between them you can set the option to whatever best suits you. This should most likely be done as an engine change, it can probably be implemented with a tweak to the audio system.

Link to comment
Share on other sites

Atm, there appear to be two minimums in use. One is for a 2-speaker system (aka "Stereo") and the other is for a 5.1 setup (aka "5.1").

 

The Stereo minimum is 0.25.

 

The 5.1 minimum is 0.

 

So, w/o digging into how the sound volume is split among the channels, I'm guessing that the Stereo code is already set up to provide a minimum amount of sound.

 

I don't know if this will work, but you could try setting "s_minVolume2" to something higher than its default setting of "0.25" (for a Stereo setup), or setting "s_minVolume6" to something higher than its default setting of "0.0". These cvars are not archived, so they get wiped when you close TDM. Maybe putting them into autoexec.cfg would make them persistent.

 

If this does work, then the remainder of the discussion should be about how to respond to the request.

 

 

  • Like 1
Link to comment
Share on other sites

Atm, there appear to be two minimums in use. One is for a 2-speaker system (aka "Stereo") and the other is for a 5.1 setup (aka "5.1").

 

The Stereo minimum is 0.25.

 

The 5.1 minimum is 0.

 

So, w/o digging into how the sound volume is split among the channels, I'm guessing that the Stereo code is already set up to provide a minimum amount of sound.

 

I don't know if this will work, but you could try setting "s_minVolume2" to something higher than its default setting of "0.25" (for a Stereo setup), or setting "s_minVolume6" to something higher than its default setting of "0.0". These cvars are not archived, so they get wiped when you close TDM. Maybe putting them into autoexec.cfg would make them persistent.

 

If this does work, then the remainder of the discussion should be about how to respond to the request.

 

 

 

So a minimum is implemented and enabled by default... something else must be wrong then. I'm using a pair of wireless stereo headphones with which I'm clearly experiencing this issue. I do have a 5.1 audio system integrated into my motherboard with speakers plugged into them, however they're a secondary device and always turned off (if they were used I wouldn't get sound in my headphones). Could TDM be detecting my headphones as a 5.1 system instead of merely stereo? If so that might be a bug or something in ALSA / PulseAudio which the engine doesn't like. I shall investigate more tomorrow, thanks.

Link to comment
Share on other sites

You own a dedicated sound card?

"I really perceive that vanity about which most men merely prate — the vanity of the human or temporal life. I live continually in a reverie of the future. I have no faith in human perfectibility. I think that human exertion will have no appreciable effect upon humanity. Man is now only more active — not more happy — nor more wise, than he was 6000 years ago. The result will never vary — and to suppose that it will, is to suppose that the foregone man has lived in vain — that the foregone time is but the rudiment of the future — that the myriads who have perished have not been upon equal footing with ourselves — nor are we with our posterity. I cannot agree to lose sight of man the individual, in man the mass."...

- 2 July 1844 letter to James Russell Lowell from Edgar Allan Poe.

badge?user=andarson

Link to comment
Share on other sites

This is quite peculiar. I loaded a FM back up then set both s_minVolume2 and s_minVolume6 to higher values. Neither made any difference, even after I used s_restart to reset the sound system. It seems that whatever I set either of them to, directional sounds will never be heard in the ear opposite of their source.

Link to comment
Share on other sites

It does seem to be a problem. It's not that noticeable on speakers, as they are positioned at certain distance from your ears. But with earphones the effect is much more jarring. Basically, you have to look straight at a speaker to hear the sound in both ears. When you turn the camera left or right, the sound gets cut off from one channel, and plays only in one ear. There seems to be an angle that allows to hear sound in both ears, but it's very narrow. Changing the values above doesn't do a thing.

Edited by Judith
Link to comment
Share on other sites

  • 3 weeks later...

I got back to this again. I was trying to compare TDM sounds with vanilla Doom 3, and the transition is smoother in D3. It also uses s_minVolume2 0.25 as default value. Changing this value actually works in Doom 3, but doesn't work in TDM. I suggest changing severity to high, as it affects player experience a lot.

 

All in all, we don't need a new "volume cap" cvar, it's just that s_minVolume2 doesn't work in TDM.

 

Edit: I just went back to 2.05 to see whether it works there, and it does. So it must have been broken during work on 2.06.

Edited by Judith
Link to comment
Share on other sites

I think the old cvars no longer work after switching to OpenAL.

 

OpenAL has its own ways of fixing the problems. They are:

1) HRTF, controlled by hrtf. I can be enabled by following these instructions.

2) crossfeed, controlled by cf_level. It can be enabled in alsoft.ini just as hrtf.

Also all of this depends on whether you use headphones or not (stereo-mode in the ini file).

 

It seems that crossfeed closely corresponds to what s_minVolume did previously.

And HRTF seems to be an even better approach.

 

Moreover, it seems that HRTF should be enabled by default if OpenAL sees that you use headphones.

It least it looks like it from the default openal.ini contents.

I'll try to play with it and see what has to be done to enable HRTF.

  • Like 3
Link to comment
Share on other sites

  • Like 1

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

There's no such .ini file in TDM folder right now. I suggest making it and finding a value that is close to original s_minVolume2 0.25, because right now, even if OpenAL does something, the hearing angle is very narrow. And IMO it shouldn't rely on whether system detects headphones or not. Onboard chips and laptops do detect headphones, but other cards, like external USB interfaces, don't. It's better to have it switchable / user-controlled.

Edited by Judith
  • Like 1
Link to comment
Share on other sites

There's no such .ini file in TDM folder right now. I suggest making it and finding a value that is close to original s_minVolume2 0.25, because right now, even if OpenAL does something, the hearing angle is very narrow. And IMO it shouldn't rely on whether system detects headphones or not. Onboard chips and laptops do detect headphones, but other cards, like external USB interfaces, don't. It's better to have it switchable / user-controlled.

Yes, most likely we should make it easy to tweak alsoft.ini.

 

Right now it is loaded in order:

1) From global settings: %APPDATA%\alsoft.ini or another location on Linux.

2) From alsoft.ini in the path where executable file is located. In case of TDM it is the root directory of TDM installation.

3) From the path specified in ALSOFT_CONF env. var.

I think distributing the default configuration file near TDM executrable is the right way to go.

 

It is OK to set cf_level in the distributed ini file, but it won't affect anything if headphones are not detected.

And I don't think it should, since the tweak only makes sense when you have headphones.

The better approach would be to log somewhere whether headphones are detected or not and explain players how to override it.

Another approach is to add a setting in the main menu "headphones" with values "auto" / "yes" / "no" and propagate this setting into OpenAL.

  • Like 1
Link to comment
Share on other sites

It is OK to set cf_level in the distributed ini file, but it won't affect anything if headphones are not detected.

And I don't think it should, since the tweak only makes sense when you have headphones.

Not really, it also sounds a bit jarring on speakers. The default cf_level = 0, and in practical terms it means something like this:

 

This is my WIP map, I placed the sound right in the middle of the door. The sound plays in both channels:

obraz.png

 

Now I turned my head to the right. The there is no sound in right channel.

obraz.png

 

IMO this default setting is too extreme, even for speakers. I suggest setting default cf_level to 2 (middle crossfeed) or changing it to 1 (low) if that's too much, but not leaving it on 0.

Edited by Judith
  • Like 1
Link to comment
Share on other sites

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.   Paste as plain text instead

  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.

  • Recent Status Updates

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...