- cleanup of the sound init/exit code.

Now there is only one single entry point for both, instead of previously 2 entry and 4 exit points.
This also eliminates the explicit shutdown of ZMusic. Timidity++'s two buffers have been put in containers that self-destruct on shutdown and calling dumb_exit is not necessary because the only feature requiring it is not used by any code in the music library.
This commit is contained in:
Christoph Oelckers 2019-10-01 20:04:46 +02:00
commit d2c156224b
20 changed files with 85 additions and 204 deletions

View file

@ -2494,7 +2494,6 @@ void D_DoomMain (void)
if (!batchrun) Printf ("S_Init: Setting up sound.\n");
S_Init ();
S_InitMusic();
if (!batchrun) Printf ("ST_Init: Init startup screen.\n");
if (!restart)
@ -2803,7 +2802,6 @@ void D_Cleanup()
R_DeinitTranslationTables(); // some tables are initialized from outside the translation code.
gameinfo.~gameinfo_t();
new (&gameinfo) gameinfo_t; // Reset gameinfo
S_ShutdownMusic();
S_Shutdown(); // free all channels and delete playlist
C_ClearAliases(); // CCMDs won't be reinitialized so these need to be deleted here
DestroyCVarsFlagged(CVAR_MOD); // Delete any cvar left by mods