mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- moved all shutdown handling for sound related resources to I_ShutdownSound instead of registering separate atterm handlers.
This commit is contained in:
parent
bcff04e76f
commit
1a3df8dfba
5 changed files with 3 additions and 18 deletions
|
@ -73,6 +73,7 @@ enum EMIDIType
|
|||
|
||||
extern int MUSHeaderSearch(const uint8_t *head, int len);
|
||||
void I_InitSoundFonts();
|
||||
extern "C" void dumb_exit();
|
||||
|
||||
EXTERN_CVAR (Int, snd_samplerate)
|
||||
EXTERN_CVAR (Int, snd_mididevice)
|
||||
|
@ -127,8 +128,6 @@ CUSTOM_CVAR (Float, snd_musicvolume, 0.5f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|||
|
||||
void I_InitMusic (void)
|
||||
{
|
||||
static bool setatterm = false;
|
||||
|
||||
I_InitSoundFonts();
|
||||
|
||||
snd_musicvolume.Callback ();
|
||||
|
@ -139,12 +138,6 @@ void I_InitMusic (void)
|
|||
I_InitMusicWin32 ();
|
||||
#endif // _WIN32
|
||||
|
||||
if (!setatterm)
|
||||
{
|
||||
setatterm = true;
|
||||
atterm (I_ShutdownMusicExit);
|
||||
|
||||
}
|
||||
MusicDown = false;
|
||||
}
|
||||
|
||||
|
@ -170,15 +163,10 @@ void I_ShutdownMusic(bool onexit)
|
|||
{
|
||||
WildMidi_Shutdown();
|
||||
TimidityPP_Shutdown();
|
||||
dumb_exit();
|
||||
}
|
||||
}
|
||||
|
||||
void I_ShutdownMusicExit()
|
||||
{
|
||||
I_ShutdownMusic(true);
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
|
|
|
@ -45,7 +45,6 @@ struct FOptionValues;
|
|||
//
|
||||
void I_InitMusic ();
|
||||
void I_ShutdownMusic (bool onexit = false);
|
||||
void I_ShutdownMusicExit ();
|
||||
void I_BuildMIDIMenuList (FOptionValues *);
|
||||
void I_UpdateMusic ();
|
||||
|
||||
|
|
|
@ -287,6 +287,7 @@ void I_CloseSound ()
|
|||
|
||||
void I_ShutdownSound()
|
||||
{
|
||||
I_ShutdownMusic(true);
|
||||
if (GSnd != NULL)
|
||||
{
|
||||
S_StopAllChannels();
|
||||
|
|
|
@ -774,8 +774,6 @@ MusInfo *MOD_OpenSong(FileReader &reader)
|
|||
bool is_it = false;
|
||||
bool is_dos = true;
|
||||
|
||||
atterm(dumb_exit);
|
||||
|
||||
int size = (int)reader.GetLength();
|
||||
auto fpos = reader.Tell();
|
||||
|
||||
|
|
|
@ -247,7 +247,6 @@ void initialize_resampler_coeffs(void)
|
|||
static bool done = false;
|
||||
if (done) return;
|
||||
done = true;
|
||||
// atterm(free_gauss_table);
|
||||
|
||||
initialize_newton_coeffs();
|
||||
initialize_gauss_table(gauss_n);
|
||||
|
|
Loading…
Reference in a new issue