mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- moved sound engine cleanup calls to own function
https://forum.zdoom.org/viewtopic.php?t=66605#p1127457
This commit is contained in:
parent
430a6f3247
commit
5966391108
3 changed files with 16 additions and 6 deletions
|
@ -742,12 +742,7 @@ void FPlayerSoundHashTable::MarkUsed()
|
||||||
void S_ClearSoundData()
|
void S_ClearSoundData()
|
||||||
{
|
{
|
||||||
if (soundEngine)
|
if (soundEngine)
|
||||||
{
|
soundEngine->Clear();
|
||||||
soundEngine->StopAllChannels();
|
|
||||||
soundEngine->UnloadAllSounds();
|
|
||||||
soundEngine->GetSounds().Clear();
|
|
||||||
soundEngine->ClearRandoms();
|
|
||||||
}
|
|
||||||
|
|
||||||
Ambients.Clear();
|
Ambients.Clear();
|
||||||
while (MusicVolumes != NULL)
|
while (MusicVolumes != NULL)
|
||||||
|
|
|
@ -68,6 +68,20 @@ void SoundEngine::Init(TArray<uint8_t> &curve)
|
||||||
S_SoundCurve = std::move(curve);
|
S_SoundCurve = std::move(curve);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//==========================================================================
|
||||||
|
//
|
||||||
|
// SoundEngine::Clear
|
||||||
|
//
|
||||||
|
//==========================================================================
|
||||||
|
|
||||||
|
void SoundEngine::Clear()
|
||||||
|
{
|
||||||
|
StopAllChannels();
|
||||||
|
UnloadAllSounds();
|
||||||
|
GetSounds().Clear();
|
||||||
|
ClearRandoms();
|
||||||
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
// S_Shutdown
|
// S_Shutdown
|
||||||
|
|
|
@ -277,6 +277,7 @@ public:
|
||||||
//
|
//
|
||||||
void Init(TArray<uint8_t> &sndcurve);
|
void Init(TArray<uint8_t> &sndcurve);
|
||||||
void InitData();
|
void InitData();
|
||||||
|
void Clear();
|
||||||
void Shutdown();
|
void Shutdown();
|
||||||
|
|
||||||
void StopAllChannels(void);
|
void StopAllChannels(void);
|
||||||
|
|
Loading…
Reference in a new issue