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

Method GetSoundLength

CrySystem/ScriptObjectSound.cpp:1240–1253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1238}
1239
1240int CScriptObjectSound::GetSoundLength(IFunctionHandler * pH)
1241{
1242 CHECK_PARAMETERS(1);
1243
1244 int nCookie=0;
1245 ISound *pSound=NULL;
1246
1247 pH->GetParamUDVal(1, (INT_PTR&)pSound, nCookie); //AMD Port
1248
1249 if (pSound && (nCookie==USER_DATA_SOUND))
1250 return pH->EndFunction( (float)pSound->GetLengthMs()/1000.f);
1251
1252 return pH->EndFunctionNull();
1253}
1254
1255//////////////////////////////////////////////////////////////////////////
1256int CScriptObjectSound::GetMusicStatus(IFunctionHandler *pH)

Callers

nothing calls this directly

Calls 4

EndFunctionMethod · 0.80
EndFunctionNullMethod · 0.80
GetParamUDValMethod · 0.45
GetLengthMsMethod · 0.45

Tested by

no test coverage detected