AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Metamod:Source Plugins (https://forums.alliedmods.net/forumdisplay.php?f=76)
-   -   VoiceHook - Developer preview of something. (https://forums.alliedmods.net/showthread.php?t=145457)

Zephyrus 07-27-2011 11:17

Re: VoiceHook - Developer preview of something.
 
Quote:

Originally Posted by asherkin (Post 1519688)
And what advantage would that bring you?

i would know how you achieved it :sadpirate:

GoD-Tony 08-14-2011 10:48

Re: VoiceHook - Developer preview of something.
 
Quote:

Originally Posted by Zephyrus (Post 1519687)
i wish it was opensource :(

SourceOP is now open-source. I haven't looked through it myself, but I think it also hooked voice chat.

asherkin 08-14-2011 12:55

Re: VoiceHook - Developer preview of something.
 
Quote:

Originally Posted by GoD-Tony (Post 1532386)
SourceOP is now open-source. I haven't looked through it myself, but I think it also hooked voice chat.

The actual voice decoding is done in the remote admin client, which afaik he has not open sourced yet (one of the reasons being the inclusion of the speex code, since he used it directly rather than going through the vaudio codecs).

Zephyrus 08-17-2011 07:25

Re: VoiceHook - Developer preview of something.
 
Quote:

Originally Posted by GoD-Tony (Post 1532386)
SourceOP is now open-source. I haven't looked through it myself, but I think it also hooked voice chat.

im not interested anymore but thank you

asherkin 10-05-2011 19:40

Re: VoiceHook - Developer preview of something.
 
http://www.dspdimension.com/admin/pi...-using-the-ft/

Code:

void smbPitchShift(float pitchShift, long numSampsToProcess, long fftFrameSize, long osamp, float sampleRate, float *indata, float *outdata);

void VoiceTest::OnVoiceBroadcast(int client, char *pVoiceData, int *nSamples)
{
        float *samples = new float[*nSamples];

        for (int i = 0; i < (*nSamples * 2); i += 2)
        {
                short sample = (pVoiceData[i+1] << 8) | pVoiceData[i];
                samples[i/2] = (float)sample / 32768.0f;
        }

        smbPitchShift(2.0, *nSamples, 1024, 32, 11025.0f, samples, samples);

        for (int i = 0; i < (*nSamples * 2); i += 2)
        {
                samples[i/2] = clamp<float>(samples[i/2], -1.0f, 0.999f);

                short sample = samples[i/2] * 32768.0f;
                pVoiceData[i+1] = (sample & 0xFF00) >> 8;
                pVoiceData[i] = sample & 0xFF;
        }

        delete samples;
}


weeb1e 10-14-2011 04:22

Re: VoiceHook - Developer preview of something.
 
Massive update broke extension :(


[META] Failed to load plugin addons/voicehook_mm: Could not find SV_BroadcastVoiceData function.

asherkin 10-14-2011 06:49

Re: VoiceHook - Developer preview of something.
 
Update.

Changes:
  • Added "raw" listeners, these are called before decompression takes place.
  • Made decompression bail-out if sv_use_steam_voice is enabled, this means that only raw listeners get called, not regular ones (and there is no longer any console spam).
  • Updated gamedata for today's update.
  • Minor fixes for changing the voice data in the listener callback.

BoBzY 10-17-2011 19:43

Re: VoiceHook - Developer preview of something.
 
Hello,

I got this error : Failed to load plugin addons/voice/bin/voicehook_mm (Could not find SV_BroadcastVoiceData function.).

:( ?

asherkin 10-18-2011 20:00

Re: VoiceHook - Developer preview of something.
 
I'm afraid Valve's descision to split CS:S from Source 2009 has broken this for it.
I... haven't decided what to do about it yet.

GoD-Tony 10-19-2011 08:49

Re: VoiceHook - Developer preview of something.
 
Quote:

Originally Posted by asherkin (Post 1578631)
I'm afraid Valve's descision to split CS:S from Source 2009 has broken this for it.
I... haven't decided what to do about it yet.

Is it just the hassle of compiling a separate binary, or has a lot changed between SDKs?


All times are GMT -4. The time now is 23:12.

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