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

Method SetSoundLoop

CrySystem/ScriptObjectSound.cpp:693–710  ·  view source on GitHub ↗

//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// ! Change the looping status of a looped sound @param nID ID of the sound @param nFlag 1/0 to enable/disable looping */

Source from the content-addressed store, hash-verified

691 @param nFlag 1/0 to enable/disable looping
692*/
693int CScriptObjectSound::SetSoundLoop(IFunctionHandler *pH)
694{
695 CHECK_PARAMETERS(2);
696 int nCookie=0;
697 int nFlag=0;
698 ISound *pSound=NULL;
699 pH->GetParamUDVal(1,(INT_PTR &)pSound,nCookie); //AMD Port
700
701 pH->GetParam(2,nFlag);
702
703 if (pSound && (nCookie==USER_DATA_SOUND))
704 {
705 //pSound->SetLooping(nFlag?true:false);
706 pSound->SetLoopMode(nFlag?true:false);
707 }
708
709 return pH->EndFunction();
710}
711/////////////////////////////////////////////////////////////////////////////////
712/////////////////////////////////////////////////////////////////////////////////
713/*! Changes the pitch of a sound sound

Callers

nothing calls this directly

Calls 4

EndFunctionMethod · 0.80
GetParamUDValMethod · 0.45
GetParamMethod · 0.45
SetLoopModeMethod · 0.45

Tested by

no test coverage detected