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

Method FadeOut

CrySoundSystem/Sound.cpp:1106–1125  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

1104
1105//////////////////////////////////////////////////////////////////////////
1106bool CSound::FadeOut()
1107{
1108 // this type of fading is purely framerate dependent
1109 m_fCurrentFade-=m_fFadingValue*m_pSSys->m_pISystem->GetITimer()->GetFrameTime();
1110
1111 //m_pSSys->m_pILog->LogToConsole("Fade OUT, current fade=%f",m_fCurrentFade);
1112
1113 if (m_fCurrentFade<0)
1114 {
1115 m_fCurrentFade=0;
1116 if (IsUsingChannel())
1117 FreeChannel();
1118 return (true);
1119 }
1120 else
1121 if (m_fCurrentFade>1.0f)
1122 m_fCurrentFade=1.0f;
1123
1124 return (false);
1125}
1126
1127//////////////////////////////////////////////////////////////////////////
1128void CSound::OnBufferLoaded()

Callers 2

ProcessActiveSoundMethod · 0.80
UpdateMethod · 0.80

Calls 2

GetITimerMethod · 0.80
GetFrameTimeMethod · 0.45

Tested by

no test coverage detected