AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Metamod:Source Plugins (https://forums.alliedmods.net/forumdisplay.php?f=76)
-   -   AutoGain - Normalize voice chat volume (https://forums.alliedmods.net/showthread.php?t=189527)

GoD-Tony 07-08-2012 05:26

AutoGain - Normalize voice chat volume
 
2 Attachment(s)
AutoGain

Makes loud voices quieter, and quiet voices louder. It will attempt to adjust everyone's microphone volume to be at the same level.

Installation:Notes:
  • Currently supports CS:GO, L4D2, Nuclear Dawn, Insurgency, TF2, CS:S, DoD:S, HL2:DM, and Source 2013 mods.
  • A lot of code was borrowed from SourceMod, CDetour, and SrcDS OSX. Credit and thanks to those projects!

checkster 07-08-2012 05:50

Re: AutoGain - Normalize voice chat volume
 
Damn you work fast bro. Was awaiting the release of this plugging.

GoD-Tony 07-09-2012 12:56

Re: AutoGain - Normalize voice chat volume
 
AutoGain 1.0.1 released.

Greatly improved the algorithim with a little inspiration from MPC-HC. I'm happy with the end result and this plugin probably won't need any more updates.

Mitchell 07-09-2012 19:27

Re: AutoGain - Normalize voice chat volume
 
Quote:

Originally Posted by GoD-Tony (Post 1746751)
AutoGain 1.0.1 released.

Greatly improved the algorithim with a little inspiration from MPC-HC. I'm happy with the end result and this plugin probably won't need any more updates.

i have a quick request maybe add some comments on what each function does? especially:
Code:

OnVoiceBroadcast(int client, char *pVoiceData, int *nSamples)
just some comments on the code, it'll help me learn :)

GoD-Tony 07-10-2012 06:51

Re: AutoGain - Normalize voice chat volume
 
Quote:

Originally Posted by Mitchell (Post 1746988)
i have a quick request maybe add some comments on what each function does? especially:
Code:

OnVoiceBroadcast(int client, char *pVoiceData, int *nSamples)
just some comments on the code, it'll help me learn :)

That's the single callback from VoiceHook, which you can find more information about in its thread. The rest is pretty straightforward MM:S code.

If it's something specific to this plugin then ask away! Otherwise the help forum is a good place to start.

Mitchell 07-10-2012 09:38

Re: AutoGain - Normalize voice chat volume
 
Quote:

Originally Posted by GoD-Tony (Post 1747263)
That's the single callback from VoiceHook, which you can find more information about in its thread. The rest is pretty straightforward MM:S code.

If it's something specific to this plugin then ask away! Otherwise the help forum is a good place to start.

yeah i was trying to replace your code with a pitch shift code but i kept getting a long long error or something. i found out that no one else was having this problem, and the code was professionally done. it was a snippet pasted by Asher. Also i really dont see a different in what this does, every one still sounds the same, but this might just be me, cause i havent got any body with a really loud mic on the server lately.

GoD-Tony 07-10-2012 10:35

Re: AutoGain - Normalize voice chat volume
 
Quote:

Originally Posted by Mitchell (Post 1747357)
yeah i was trying to replace your code with a pitch shift code but i kept getting a long long error or something. i found out that no one else was having this problem, and the code was professionally done. it was a snippet pasted by Asher.

I haven't tried that code myself. I recommend posting your error log there if the snippet isn't working for you.

Quote:

Originally Posted by Mitchell (Post 1747357)
Also i really dont see a different in what this does, every one still sounds the same, but this might just be me, cause i havent got any body with a really loud mic on the server lately.

If everyone sounds "normal" then that means it's working. It's something you would just install and forget about.

A quick way to test the plugin:
  1. Unload AutoGain
  2. Set voice_loopback to 1 on your client
  3. Lower your mic volume.
  4. Talk in-game. It should barely be audible.
  5. Load AutoGain and talk in-game again. Your volume will be adjusted.
The same applies to microphones that are too loud, such as when someone is screaming/yelling. Volume will decrease faster than it increases.

Mitchell 07-10-2012 14:23

Re: AutoGain - Normalize voice chat volume
 
Quote:

Originally Posted by GoD-Tony (Post 1747385)
I haven't tried that code myself. I recommend posting your error log there if the snippet isn't working for you.

If everyone sounds "normal" then that means it's working. It's something you would just install and forget about.

A quick way to test the plugin:
  1. Unload AutoGain
  2. Set voice_loopback to 1 on your client
  3. Lower your mic volume.
  4. Talk in-game. It should barely be audible.
  5. Load AutoGain and talk in-game again. Your volume will be adjusted.
The same applies to microphones that are too loud, such as when someone is screaming/yelling. Volume will decrease faster than it increases.

alright thank you.

Mitchell 07-10-2012 21:40

Re: AutoGain - Normalize voice chat volume
 
THis could be used to stop the annoying loop back if the client has a mic close to a speaker, ive tried it but it needs some tweaking, maybe making the volume lower, cause it was repeating a very high pitched noise.

GoD-Tony 07-11-2012 05:52

Re: AutoGain - Normalize voice chat volume
 
Quote:

Originally Posted by Mitchell (Post 1747710)
THis could be used to stop the annoying loop back if the client has a mic close to a speaker, ive tried it but it needs some tweaking, maybe making the volume lower, cause it was repeating a very high pitched noise.

It actually does lower the volume quite a bit, and you'll notice that if another client is speaking while those loud sounds go off, they appear to be the same volume. The reason it feels louder is because a higher pitch (or any annoying sound) gives a higher perceived volume, while the actual volume is the same.

I'll see if I can make some changes but no guarantees. I wouldn't want it to affect voices.

Fun fact: Commercials on TV (loosely) take advantage of this and it's why they always feel louder as well.

Mitchell 07-11-2012 17:18

Re: AutoGain - Normalize voice chat volume
 
Oh, awesome, i didnt know that, i havent learned much about of sound lol.

C0nw0nk 07-12-2012 15:47

Re: AutoGain - Normalize voice chat volume
 
Wow nice this is a good idea :D should fix people screaming into there microphone like this guy.

http://www.youtube.com/watch?v=sfCiOzL7cYs#t=6m40s

TheAvengers2 08-23-2012 02:53

Re: AutoGain - Normalize voice chat volume
 
Hmm... AutoGain appears to trigger a crash on quit or _restart.

Linux.

GoD-Tony 08-23-2012 03:09

Re: AutoGain - Normalize voice chat volume
 
Quote:

Originally Posted by TheAvengers2 (Post 1779866)
Hmm... AutoGain appears to trigger a crash on quit or _restart.

Can you confirm if this only happens with VoiceHook installed by itself?

TheAvengers2 08-23-2012 03:11

Re: AutoGain - Normalize voice chat volume
 
Yes, I made sure to confirm it. The crash only occurs while AutoGain is present. The crash did not occur when only VoiceHooks was loaded.

GoD-Tony 08-23-2012 03:45

Re: AutoGain - Normalize voice chat volume
 
Quote:

Originally Posted by TheAvengers2 (Post 1779881)
Yes, I made sure to confirm it. The crash only occurs while AutoGain is present. The crash did not occur when only VoiceHooks was loaded.

Hmm, I can't reproduce the crash on Windows or Linux, even when tested against the latest MM:S snapshot.

TheAvengers2 08-23-2012 04:10

Re: AutoGain - Normalize voice chat volume
 
Hmm... I did a fresh install of CS:S with MM:S, VoiceHook, and AutoGain. I'm still getting the crash.

GoD-Tony 08-24-2012 05:06

Re: AutoGain - Normalize voice chat volume
 
AutoGain 1.0.2 released.

Fixed the above crash that happened during server shutdown if VoiceHook unloaded before AutoGain.

GoD-Tony 11-15-2012 03:17

Re: AutoGain - Normalize voice chat volume
 
Code:

<mib_wc7lfd> when will your autogain work with steam voice?
<GoD-Tony> When VoiceHook supports steam voice decoding
<GoD-Tony> Actually that codec already has a good autogain and wouldn't need my plugin anyway


robotortoise 06-05-2014 19:53

Re: AutoGain - Normalize voice chat volume
 
This is awesome! Will surely make sure people micspam at the right level on my server!

Thanks GoD-Tony! :)

robotortoise 06-11-2014 19:59

Re: AutoGain - Normalize voice chat volume
 
Yeah...I'm afraid this doesn't work.

The error "[AUTOGAIN] Could not find interface VOICE_INTERFACE_002 (error 1)." is popping up. Did I install the Voice interface incorrectly somehow?

Bubka3 06-22-2014 03:30

Re: AutoGain - Normalize voice chat volume
 
Quote:

Originally Posted by robotortoise (Post 2150124)
Yeah...I'm afraid this doesn't work.

The error "[AUTOGAIN] Could not find interface VOICE_INTERFACE_002 (error 1)." is popping up. Did I install the Voice interface incorrectly somehow?

This probably has to do with VoiceHook no longer working.

robotortoise 06-22-2014 15:47

Re: AutoGain - Normalize voice chat volume
 
Oh, fun.

zeroibis 07-16-2014 00:50

Re: AutoGain - Normalize voice chat volume
 
Any way we could get an option for clients to toggle this on/off so they can disable it if they do not want it?

robotortoise 07-16-2014 01:02

Re: AutoGain - Normalize voice chat volume
 
Quote:

Originally Posted by zeroibis (Post 2168488)
Any way we could get an option for clients to toggle this on/off so they can disable it if they do not want it?

It doesn't work anyways.

robotortoise 08-01-2014 03:40

Re: AutoGain - Normalize voice chat volume
 
Yay, now you can fix this plugin, GoD-Tony!

asherkin 08-01-2014 05:43

Re: AutoGain - Normalize voice chat volume
 
Quote:

Originally Posted by robotortoise (Post 2177174)

That plugin doesn't provide the voice data.

Zephyrus 08-01-2014 07:18

Re: AutoGain - Normalize voice chat volume
 
i already have my own voicehook that im going to release soon I'm just real busy right now with real life stuff and i still have to make it compatible with the other voicehook interfaces to provide a drop-in replacement, it will even work with steam voice and wont require any 3rd party libraries

GoD-Tony 08-01-2014 10:32

Re: AutoGain - Normalize voice chat volume
 
Quote:

Originally Posted by Zephyrus (Post 2177246)
i already have my own voicehook that im going to release soon I'm just real busy right now with real life stuff and i still have to make it compatible with the other voicehook interfaces to provide a drop-in replacement, it will even work with steam voice and wont require any 3rd party libraries

That'd be great, then I don't have to make this a standalone.

checkster 08-05-2014 03:01

Re: AutoGain - Normalize voice chat volume
 
Quote:

Originally Posted by Zephyrus (Post 2177246)
i already have my own voicehook that im going to release soon I'm just real busy right now with real life stuff and i still have to make it compatible with the other voicehook interfaces to provide a drop-in replacement, it will even work with steam voice and wont require any 3rd party libraries

Will this work for CS:GO?

Zephyrus 08-05-2014 03:38

Re: AutoGain - Normalize voice chat volume
 
Quote:

Originally Posted by checkster (Post 2179091)
Will this work for CS:GO?

yes

checkster 08-05-2014 04:33

Re: AutoGain - Normalize voice chat volume
 
Quote:

Originally Posted by Zephyrus (Post 2179104)
yes

Brilliant, any est on release? or if you need testing, pm me, I really want to be able to use autogain in go.

Zephyrus 08-05-2014 05:54

Re: AutoGain - Normalize voice chat volume
 
ive been using it for months it works just fine, i just have to add the interface that voicehook uses to provide a drop in replacement i just dont have the time right now

asherkin 08-05-2014 05:56

Re: AutoGain - Normalize voice chat volume
 
Quote:

Originally Posted by Zephyrus (Post 2179146)
ive been using it for months it works just fine, i just have to add the interface that voicehook uses to provide a drop in replacement i just dont have the time right now

You really shouldn't be providing VoiceHook's interface - that's owned by VoiceHook.

Zephyrus 08-05-2014 07:12

Re: AutoGain - Normalize voice chat volume
 
Quote:

Originally Posted by asherkin (Post 2179147)
You really shouldn't be providing VoiceHook's interface - that's owned by VoiceHook.

ill just keep the IVoiceListener class and use a diff name for the interface query so its just a matter of a simple recompile

Ben.vpk 08-11-2014 15:12

Re: AutoGain - Normalize voice chat volume
 
Is there any chance that VoiceHook can/will be fixed one day ? :roll:

St00ne 09-19-2014 18:22

Re: AutoGain - Normalize voice chat volume
 
Hi,

Is it possible that this Metamod plugin now works without Voice Hook?

Regarding the post right above mine, Voice Hooks seems no longer up to date.
Plus, I just installed the extension and I have no error, it is loaded when I type meta list, and also I might be wrong but I think I noticed a slight difference in voices on my server.

++

GoD-Tony 09-21-2014 15:10

Re: AutoGain - Normalize voice chat volume
 
I've updated the first post with a standalone version of Autogain which removes the VoiceHook dependency and adds support for a lot more games.

It's only been tested on CS:GO and L4D2 on Windows. Consider the Linux build experimental until someone has a chance to confirm it works.

robotortoise 09-21-2014 18:04

Re: AutoGain - Normalize voice chat volume
 
Quote:

Originally Posted by GoD-Tony (Post 2202090)
I've updated the first post with a standalone version of Autogain which removes the VoiceHook dependency and adds support for a lot more games.

It's only been tested on CS:GO and L4D2 on Windows. Consider the Linux build experimental until someone has a chance to confirm it works.

Oooh! ooh! I call being the guinea pig!

EDIT: Oh, wait, nevermind. It requires sv_use_steam_voice to be set to 0, and that doesn't work too well for micspamming. Shame.

GoD-Tony 09-22-2014 01:41

Re: AutoGain - Normalize voice chat volume
 
Quote:

Originally Posted by robotortoise (Post 2202153)
It requires sv_use_steam_voice to be set to 0, and that doesn't work too well for micspamming.

Can you clarify what doesn't work for micspamming?

I'll consider adding support for steam_voice if there's enough interest, but it probably won't be right away.


All times are GMT -4. The time now is 08:56.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.