MCPcopy Create free account
hub / github.com/ddnet/ddnet / SdlCallback

Function SdlCallback

src/engine/client/sound.cpp:171–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171static void SdlCallback(void *pUser, Uint8 *pStream, int Len)
172{
173 CSound *pSound = static_cast<CSound *>(pUser);
174
175#if defined(CONF_VIDEORECORDER)
176 if(!(IVideo::Current() && g_Config.m_ClVideoSndEnable))
177 {
178 pSound->Mix((short *)pStream, Len / sizeof(short) / 2);
179 }
180 else
181 {
182 mem_zero(pStream, Len);
183 }
184#else
185 pSound->Mix((short *)pStream, Len / sizeof(short) / 2);
186#endif
187}
188
189int CSound::Init()
190{

Callers

nothing calls this directly

Calls 2

mem_zeroFunction · 0.85
MixMethod · 0.80

Tested by

no test coverage detected