Barotrauma

Barotrauma

Soundproof Walls 2.0
852 Comments
lucky_washa 13 hours ago 
@plag- yes even when set to classic for "effect processing mode" the problem still occurs.
Plag  [author] 16 hours ago 
@kirP - Okay cool, that answers all my questions. Thanks man, you've been very helpful. Have a good one!
Plag  [author] 23 hours ago 
@kirP - Wow, thanks for going through the effort of testing this. That's strange, but it does match up with your performance stats. For your system, it seems like it's less about how Soundproof Walls processes sounds and more about how many sounds are playing.

To confirm this with one last test, could you please try setting "Max Playing Sounds" to 32 and "Max Simultaneous Instances" to 5? These are the vanilla values. Then compare the frame drop you get with Soundproof Walls enabled and disabled (you can use the "Enable Mod" toggle in the General tab).

If there's still a drop when disabled, it indicates your system just struggles to play Barotrauma's sounds in general for some mysterious reason. Which would explain why there weren't huge numbers in the mod's "Show Performance" overlay. Instead, the large update times are likely in the vanilla game's "showperf" overlay.
kirP 24 Oct @ 1:42am 
Nuked my install of barotrauma clean, reinstalled the game, reinstalled lua, made sure only lua & this mod was enabled and the lever+door(s) combo was still destroying performance.

Dropping max playing sounds to ~45 stopped FPS from going from 100 to single digits and instead to 90
Plag  [author] 22 Oct @ 10:30am 
@TheDreamer, @Lagmanor - The mod is working. Every Barotrauma update requires a new Lua version and until the new version releases no Lua/C# mods work.
Lagmanor 22 Oct @ 6:46am 
Uhh, sure it's not a Lua problem? I mean, it's Lua dependent, and one *does* break after every update of the game...
I'm not at all making any statements here, mind you. It just seems that the devs focused purely on server lists sorting witht this one, and I as a totally random dude have no clue how would that break the sound logic...
Do not mind me though, I'm just bored here waiting for the Lua update, lol.
Plag  [author] 22 Oct @ 1:24am 
@lucky_washa - Sorry to hear that. I'll add that as a known issue for Mac in the Report Bugs discussion and I'll see if I can figure out a solution in a future update. By the way, does the problem still happen with your "Effect Processing Mode" (General tab) set to Classic?
Plag  [author] 22 Oct @ 1:21am 
@kirP - Your Soundproof Walls update time is spiking from 0.05ms to 0.2ms. This is likely from the mod's increased max sound limit (you can tweak this with "Max Playing Sounds" in the Advanced tab).

To put that in perspective, 60 FPS requires the combined update time to stay under 16.67ms. Your 0.15ms spike is not large enough to cause this lag alone, so something else must be taking up considerable resources.

You can type "showperf" in console to see your combined update time and a breakdown of all contributing processes. Your "Items" update time is probably high.

I tested your lever setup and the mod's spikes were 0.04 to 0.047 (high-end Windows PC) and 0.07 to 0.09 (low-end Linux PC), these jumps being considerably lower also points toward something else on your system using the resources. My combined update time never went high enough to see any frame drops.

Is it possibly caused by another mod? Also, you only get this issue in this specific door situation, correct?
kirP 21 Oct @ 6:05pm 
"It's unlikely related to the mod. Can you please verify using "Show Performance" in the Advanced tab?"
Not sure what I should be looking for but here:
https://cdn.steamusercontent.com/ugc/14134035929568009136/217D566669F44F8F75D638D05AC66B6AE361BFBF/

Don't have this issue with the mod disabled
lucky_washa 21 Oct @ 1:48pm 
Also(mac user) experiencing the same with sounds like how @fenthouse explained... it is very likely an issue with Mac ,tried tweaking with settings as well.
fentHOUSE 21 Oct @ 9:14am 
@Plag Nope, tried toggling them both individually and then both at the same time but it still didn't fix the issue, thanks for trying to help though.
Plag  [author] 21 Oct @ 8:56am 
@fentHouse - Yeah, Mac had some unique challenges during development. That's unfortunate. One setting you might not have tried toggling is "Disable Vanilla Fade Out" in the Advanced tab. And also "Realistic Sound Falloff" in the General tab.
fentHOUSE 21 Oct @ 8:43am 
I've tried tweaking every relevant setting to this issue and nothing works except disabling the mod, thx for the help but I think the mod just isn't well compatible with mac at the moment. Atleast it doesn't crash the game before 2.0 though lol.
fentHOUSE 21 Oct @ 8:30am 
I've even only listened to one earphone at a time and notice that absolutely no noise comes from both of them at the same time from a single source of noise while the mod is enabled.
fentHOUSE 21 Oct @ 8:26am 
What I mean by fixed is that I can walk past objects and the smooth transitions smoothly from ear to ear.
Plag  [author] 21 Oct @ 8:22am 
@fentHOUSE - Do some tests with the mod disabled, you can toggle it in the General tab. But generally that's just how the game works.
Plag  [author] 21 Oct @ 8:21am 
@kirP - It's unlikely related to the mod. Can you please verify using "Show Performance" in the Advanced tab?
fentHOUSE 21 Oct @ 8:16am 
It feels as though the noise from any object is restrained to either play in my left or right ear without any mixing basically.
fentHOUSE 21 Oct @ 8:14am 
Btw, to go more in-depth into my issue, it specifically affects any objects that create noise.

For example, if I open a door and run past it's centre, the after-noise of the door opening shifts from one ear to another, which is a little uncomfortable.

Also, if I run past the oxygen generator, the noise of the generator shifts from left to right ear as i move past it's centre. So if I just walk back and forth slightly in the middle of the oxygen generator I can audibly hear the passive noise of the generator switch quickly between left and right ear.
fentHOUSE 21 Oct @ 8:09am 
@Plag I play on Mac, could that be the issue? My headphones do support surround sound with whatever settings im using as I use sony headphones and tested them with some youtube videos, and they work fine for them.
Lagmanor 21 Oct @ 5:54am 
"Accidents happen, submarines explode"
kirP 21 Oct @ 5:53am 
"Why in the world would you connect a continuous signal to a toggle_state??"
cuz i dragged the wire to the wrong one on accident lol
Lagmanor 21 Oct @ 5:38am 
Why in the world would you connect a continuous signal to a toggle_state??
kirP 21 Oct @ 5:36am 
Created the Performance Destroyer-5000 by pulling a lever connected to a door's toggle_state, lagging the game as it spammed door noises.

Please fix :(
Lagmanor 21 Oct @ 5:06am 
@Plag,
Ah, there IS a hull, right. Seems logical in this case, yeah. I just totally forgot it is there; was inspecting the drone myself a few years back.
It's totally alright then, I'll keep on using focus target audio off for this one by now.

Huge thanks for adressing this in any case!
Plag  [author] 20 Oct @ 9:51pm 
@Lagmanor - I tried out the sub. The problem is that the turret is considered to be inside the drone's hull, so there's no water or other obstructions to muffle its rotation sound, and because the muffle strength is zero, adjusting the MuffleInfluence multiplier does nothing.

There's not really any solution for this unfortunately. Reducing the GainMult doesn't work either because the turret movement sound in particular has custom logic that bypasses it (gain is directly tied to rotation speed).

I'll consider implementing an extra tool next patch that allows for any sound to be forcefully muffled.
Plag  [author] 20 Oct @ 8:12pm 
@fentHOUSE - Sounds shouldn't be playing from just one ear before switching. Are you running some kind of surround sound setup that your headphones don't support? I suggest taking a look at your audio settings in Windows.
Lagmanor 20 Oct @ 12:29pm 
@Plag,

That actually solved my own problem as well!
However, this method doesn't seem to do any effect when it's a gun attached to a remote drone.

There's this submarine, it's called Sleipnir - it has a periscope-controlled drone with three pulse lasers on it - none of them gets muffled neither during turning or shooting (while the XML tweak definitely does it dor the guns on the submarine itself).

I was checking the "currently playing sounds" debug monitor and it shows the same railgun start/loop/end for turning, and also (obviously) "weapons_chargeup.ogg" for shooting.
fentHOUSE 20 Oct @ 12:22pm 
This mod is great, one question though, is there a way to make the sound more "centred"? It's pretty jarring moving past machines which makes noise for them to suddenly switch from one ear to another. Thanks.
Plag  [author] 20 Oct @ 8:10am 
@Leviathan - Hey, glad I could help :)
Let me know if you have any other issues or questions!
Leviathan 19 Oct @ 11:34pm 
Hey Plag,

you answered my question perfectly. I had difficulties explaining it. Will add the entry to the custom sounds.

Thank you for your effort!
Plag  [author] 19 Oct @ 10:51am 
@Leviathan - I'm not 100% sure I understand. But assuming you're using the vanilla turret sounds, that seems normal. The game tends to skip the start-up sound and just repeatedly play the "raingunloop" sound from the beginning, which can sound pretty janky. You don't really notice this in vanilla because your ears stay locked to your character, so turret rotation sounds are always muffled or too far away.

You could disable "Focus Target Audio" (General tab) to keep your ears locked, but I recommend doing the following:

Find the entry in the "Custom Sounds" list (Advanced tab) with the Keyword "railgun". This entry is for the actual railgun weapon, and because it uses the same name as the rotation sound, we must add a new entry BELOW it, also using the "railgun" Keyword - should look like this: https://imgur.com/a/Z6HsTF2

Increase the MuffleInfluence to make it more muffled. I encourage experimenting with adjusting the PitchMult and GainMult to see if there's a sound you like more.
Leviathan 19 Oct @ 4:34am 
First of all, I'd like to thank you for this great mod. I have a somewhat specific question.

When I move a turret to aim, the sound starts as a new sound sample each time, even though the movement continues for another centimeter or so.

Perhaps it's something to do with my configuration (for example, I disabled Dolby for testing), but perhaps it's also a setting I can't find. Or maybe it just the Sound engine from Barotrauma.

I hope this specific question can be resolved somehow :D.
Plag  [author] 19 Oct @ 3:48am 
@FreeGamer - The default value where it says "Disabled" should be at 100% not 115%. Is your server using the latest version of the mod? And yes, you may have to rejoin the game for it to change.
FreeGamer 19 Oct @ 3:35am 
that might be it but it doesn't seem to change anything, the default with disabled is at 115%, do I have to rejoin the game for it to change?
Plag  [author] 19 Oct @ 2:53am 
@FreeGamer - There is a zoom component to the eavesdropping mechanic that has been known to cause problems with other mods that modify the camera. The feature is now disabled by default, but if you downloaded Soundproof Walls 2.0 when it came out you might still have it on. You can either reset your config or go into the Eavesdropping tab and set "Eavesdropping Camera Zoom" to 100%.
FreeGamer 19 Oct @ 2:33am 
Hey is it just me or does the mod somehow affect the zoom of the camera?
Plag  [author] 17 Oct @ 9:51pm 
@Ridex - I understand. Could you please upload the mod as unlisted and send it to me so I can test it? This issue sounds fairly unique. I want to help but I can't without seeing the code.
Ridex 17 Oct @ 8:43pm 
And the sound like repeating
Ridex 17 Oct @ 8:43pm 
Its local on my pc, but i tested it with SW 2.0 off, and its work fine.
So to clear out what i mean, its sounds like you just standing and pressing the button once and once again, and the music is like playing 10x times, like if you turn on 10 the same ones video but with 1 sec pause
Plag  [author] 17 Oct @ 5:34pm 
@Ridex - Okay, is it possible for me to test out your item? And to confirm, this doesn't happen if you disable Soundproof Walls?
Ridex 17 Oct @ 9:46am 
Yes, sorry for the lack of details. I add it by item, and its played by an item, its streamed, what do i mean by "turns into garbage", its sounds like its just looping the sound 10x times, so you can't just understand what is playing
Plag  [author] 16 Oct @ 10:33pm 
@Ridex - I'm not sure what you mean. How have you added music? Is it played via item or status effect? Is it streamed or looped? And what do you mean "turns into garbage"?
I'm happy to help but I will likely need to test your mod directly.
Ridex 16 Oct @ 10:24pm 
Hey, sorry to ask, but could you help me with something?
I added my own music to the game, so when I press a button, it starts playing, but with this mod, it just loops and the music turns into garbage.
I've disabled a lot of settings, but it doesn't help.
Target Practice 15 Oct @ 7:05pm 
I'll do that next time we host.
Plag  [author] 15 Oct @ 6:31pm 
@Target Practice - It's unlikely to be related. I suggest telling them to enable "Show Performance" to verify it.
Target Practice 15 Oct @ 6:27pm 
I don't have any performance issues myself, but several people on a server I host (anecdotally) report poor performance while using dynamic mode, and improved performance with static mode.
Plag  [author] 15 Oct @ 6:27pm 
@Target Practice - The performance will vary based on your system. I recommend enabling "Show Performance" (Advanced tab) so you can compare. But generally speaking you shouldn't have to worry about performance, for the average player this mod only costs ~0.01 frames per second.

Feature wise, if you switch to static mode, you'll lose out on all the features described in the Dynamic tab e.g., reverb, distortion, dynamic muffling, occlusion, and better sound path finding. There's a more detailed breakdown of these modes in the v2.0 patch notes.
Target Practice 15 Oct @ 3:19pm 
Also, what features does it lack compared to dynamic mode?