MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / SetSoundFrequency

Method SetSoundFrequency

CrySystem/ScriptObjectSound.cpp:717–735  ·  view source on GitHub ↗

//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// ! Changes the pitch of a sound sound @param nID ID of the sound @param nFrequency Frequency, value range is between 0 and 1000 */

Source from the content-addressed store, hash-verified

715 @param nFrequency Frequency, value range is between 0 and 1000
716*/
717int CScriptObjectSound::SetSoundFrequency(IFunctionHandler *pH)
718{
719 CHECK_PARAMETERS(2);
720 int nCookie=0;
721 int nFrequency=0;
722 ISound *pSound=NULL;
723
724
725 pH->GetParamUDVal(1,(INT_PTR &)pSound,nCookie); //AMD Port
726 pH->GetParam(2,nFrequency);
727
728
729 if (pSound && (nCookie==USER_DATA_SOUND))
730 {
731 pSound->SetPitch(nFrequency);
732 }
733
734 return pH->EndFunction();
735}
736//////////////////////////////////////////////////////////////////////////
737//////////////////////////////////////////////////////////////////////////
738int CScriptObjectSound::SetSoundPitching(IFunctionHandler *pH)

Callers

nothing calls this directly

Calls 4

EndFunctionMethod · 0.80
GetParamUDValMethod · 0.45
GetParamMethod · 0.45
SetPitchMethod · 0.45

Tested by

no test coverage detected