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

Function S_SetDynamicMusicState

code/client/snd_dma.cpp:4326–4340  ·  view source on GitHub ↗

called by both the config-string parser and the console-command state-changer... This either changes the music right now (copying track structures etc), or leaves the new state as pending so it gets picked up by the general music player if in a transition that can't be overridden...

Source from the content-addressed store, hash-verified

4324// so it gets picked up by the general music player if in a transition that can't be overridden...
4325//
4326static void S_SetDynamicMusicState( MusicState_e eNewState )
4327{
4328 if (eMusic_StateRequest != eNewState)
4329 {
4330 eMusic_StateRequest = eNewState;
4331
4332 if (s_debugdynamic->integer)
4333 {
4334 const char *psNewStateString = Music_BaseStateToString( eNewState, qtrue );
4335 psNewStateString = psNewStateString?psNewStateString:"<unknown>";
4336
4337 Com_Printf( S_COLOR_MAGENTA "S_SetDynamicMusicState( Request: \"%s\" )\n", psNewStateString );
4338 }
4339 }
4340}
4341
4342
4343static void S_HandleDynamicMusicStateChange( void )

Callers 3

S_SetDynamicMusic_fFunction · 0.70
S_RestartMusicFunction · 0.70
S_CheckDynamicMusicStateFunction · 0.70

Calls 2

Music_BaseStateToStringFunction · 0.70
Com_PrintfFunction · 0.50

Tested by

no test coverage detected