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

Function S_BeginRegistration

code/client/snd_dma.cpp:918–950  ·  view source on GitHub ↗

===================== S_BeginRegistration ===================== */

Source from the content-addressed store, hash-verified

916=====================
917*/
918void S_BeginRegistration( void )
919{
920 s_soundMuted = qfalse; // we can play again
921
922#ifdef USE_OPENAL
923 // Find name of level so we can load in the appropriate EAL file
924 if (s_UseOpenAL)
925 {
926 const char *mapname = Cvar_VariableString( "mapname" );
927 EALFileInit(mapname);
928 // clear carry crap from previous map
929 for (int i = 0; i < EAX_MAX_FXSLOTS; i++)
930 {
931 s_FXSlotInfo[i].lEnvID = -1;
932 }
933 }
934#endif
935
936 if (s_numSfx == 0) {
937 SND_setup();
938
939 s_numSfx = 0;
940 memset( s_knownSfx, 0, sizeof( s_knownSfx ) );
941 memset(sfxHash, 0, sizeof(sfx_t *)*LOOP_HASH);
942
943#ifdef _DEBUG
944 sfx_t *sfx = S_FindName( "***DEFAULT***" );
945 S_DefaultSound( sfx );
946#else
947 S_RegisterSound("sound/null.wav");
948#endif
949 }
950}
951
952#ifdef USE_OPENAL
953static void EALFileInit(const char *level)

Callers 3

CL_Vid_Restart_fFunction · 0.70
CL_StartSoundFunction · 0.70
CL_StartHunkUsersFunction · 0.70

Calls 6

EALFileInitFunction · 0.70
SND_setupFunction · 0.70
S_FindNameFunction · 0.70
S_DefaultSoundFunction · 0.70
S_RegisterSoundFunction · 0.70
Cvar_VariableStringFunction · 0.50

Tested by

no test coverage detected