You're only able to get which player is currently speaking by pPlayer->IsSpeaking() was the function I believe, for the waveforms, they are hidden behind an internal engine interface which you can't access under normal ways (if one got trough that feel free to write it down here), but I've been mimicing it by using random (the following code is taken from Garry's Lua code for moving the player's mouth and turned into C++ Code with a working solution), also note that this is client side code (I use it in CHL2MPPlayerAnimState::Update in case you want to know):
if( m_fVoiceTimeout >= gpGlobals->curtime ) return; // If we had access to the volume or waveforms from the player one could replace the following line to use that instead of a Random Float, but this is as close as it'll get if( GetClientVoiceMgr()->IsPlayerSpeaking( pHL2MPPlayer->entindex() ) || ( pHL2MPPlayer->IsLocalPlayer() && GetClientVoiceMgr()->IsLocalPlayerSpeaking() ) ) m_fVoice = ( random->RandomFloat( 0.1f, 1.0f ) / m_fVoice ); LocalFlexController_t iFlexNum = pHL2MPPlayer->GetNumFlexControllers(); if( --iFlexNum <= 0 ) return; for( LocalFlexController_t i = LocalFlexController_t( 0 ); i < iFlexNum; i++ ) { const char* szName = pHL2MPPlayer->GetFlexControllerName( i ); if( !V_strcmp( szName, "jaw_drop" ) || !V_strcmp( szName, "right_part" ) || !V_strcmp( szName, "left_part" ) || !V_strcmp( szName, "right_mouth_drop" ) || !V_strcmp( szName, "left_mouth_drop" ) ) { if( GetClientVoiceMgr()->IsPlayerSpeaking( pHL2MPPlayer->entindex() ) || ( pHL2MPPlayer->IsLocalPlayer() && GetClientVoiceMgr()->IsLocalPlayerSpeaking() ) ) pHL2MPPlayer->SetFlexWeight( i, clamp( m_fVoice * 2, 0, 2 ) ); else pHL2MPPlayer->SetFlexWeight( i, 0 ); } } m_fVoiceTimeout = gpGlobals->curtime + 0.2f; I hope this helps you figure out how to do whatever you're trying to archive On 08.05.2013 10:23, Garry Newman wrote: > I don't think it's exposed to modders. I had to add engine code to get > it in G(arry's )Mod. > > > On Wed, May 8, 2013 at 3:52 AM, Jesse F <jesf...@gmail.com > <mailto:jesf...@gmail.com>> wrote: > > I was hoping someone might be able to help me out. I'd like access > to info about the waveforms sent by people using in game voice. > I'd mainly like to know how loud they are speaking (or some > similar average value) and I'd like to be able to keep a list > updated with which players are speaking. My initial search through > the code for this functionality didn't turn up much. > > -- > Jesse > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list > archives, please visit: > https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders > > > > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, please > visit: > https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders >
_______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders