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.


All times are GMT -4. The time now is 04:05.

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