mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 15:02:01 +00:00
Properly unload the backend sound buffers
This commit is contained in:
parent
0a8083e280
commit
60cc91e000
1 changed files with 5 additions and 6 deletions
|
@ -593,16 +593,15 @@ void S_CacheSound (sfxinfo_t *sfx)
|
|||
//==========================================================================
|
||||
|
||||
void S_UnloadSound (sfxinfo_t *sfx)
|
||||
{
|
||||
if (sfx->data.isValid())
|
||||
{
|
||||
if (sfx->data3d.isValid() && sfx->data != sfx->data3d)
|
||||
GSnd->UnloadSound(sfx->data3d);
|
||||
if (sfx->data.isValid())
|
||||
GSnd->UnloadSound(sfx->data);
|
||||
if (sfx->data.isValid() || sfx->data3d.isValid())
|
||||
DPrintf(DMSG_NOTIFY, "Unloaded sound \"%s\" (%td)\n", sfx->name.GetChars(), sfx - &S_sfx[0]);
|
||||
sfx->data.Clear();
|
||||
sfx->data3d.Clear();
|
||||
DPrintf(DMSG_NOTIFY, "Unloaded sound \"%s\" (%td)\n", sfx->name.GetChars(), sfx - &S_sfx[0]);
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
Loading…
Reference in a new issue