MCPcopy Create free account
hub / github.com/JACoders/OpenJK / S_ReloadAllUsedSounds

Function S_ReloadAllUsedSounds

code/client/snd_dma.cpp:648–663  ·  view source on GitHub ↗

only called from snd_restart. QA request...

Source from the content-addressed store, hash-verified

646// only called from snd_restart. QA request...
647//
648void S_ReloadAllUsedSounds(void)
649{
650 if (s_soundStarted && !s_soundMuted )
651 {
652 // new bit, reload all soundsthat are used on the current level...
653 //
654 for (int i=1 ; i < s_numSfx ; i++) // start @ 1 to skip freeing default sound
655 {
656 sfx_t *sfx = &s_knownSfx[i];
657
658 if (!sfx->bInMemory && !sfx->bDefaultSound && sfx->iLastLevelUsedOn == re.RegisterMedia_GetLevel()){
659 S_memoryLoad(sfx);
660 }
661 }
662 }
663}
664
665// =======================================================================
666// Shutdown sound engine

Callers 1

CL_Snd_Restart_fFunction · 0.70

Calls 1

S_memoryLoadFunction · 0.70

Tested by

no test coverage detected