mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-01 14:20:55 +00:00
- restored sound-related developer messages
https://forum.zdoom.org/viewtopic.php?t=71486
This commit is contained in:
parent
65b0047b26
commit
e6810620cd
1 changed files with 6 additions and 2 deletions
|
@ -42,6 +42,7 @@
|
||||||
#include "superfasthash.h"
|
#include "superfasthash.h"
|
||||||
#include "s_music.h"
|
#include "s_music.h"
|
||||||
#include "m_random.h"
|
#include "m_random.h"
|
||||||
|
#include "printf.h"
|
||||||
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
@ -182,7 +183,10 @@ void SoundEngine::CacheSound (sfxinfo_t *sfx)
|
||||||
void SoundEngine::UnloadSound (sfxinfo_t *sfx)
|
void SoundEngine::UnloadSound (sfxinfo_t *sfx)
|
||||||
{
|
{
|
||||||
if (sfx->data.isValid())
|
if (sfx->data.isValid())
|
||||||
|
{
|
||||||
GSnd->UnloadSound(sfx->data);
|
GSnd->UnloadSound(sfx->data);
|
||||||
|
DPrintf(DMSG_NOTIFY, "Unloaded sound \"%s\" (%td)\n", sfx->name.GetChars(), sfx - &S_sfx[0]);
|
||||||
|
}
|
||||||
sfx->data.Clear();
|
sfx->data.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -724,7 +728,7 @@ sfxinfo_t *SoundEngine::LoadSound(sfxinfo_t *sfx)
|
||||||
if (S_sfx[i].data.isValid() && S_sfx[i].link == sfxinfo_t::NO_LINK && S_sfx[i].lumpnum == sfx->lumpnum &&
|
if (S_sfx[i].data.isValid() && S_sfx[i].link == sfxinfo_t::NO_LINK && S_sfx[i].lumpnum == sfx->lumpnum &&
|
||||||
(!sfx->bLoadRAW || (sfx->RawRate == S_sfx[i].RawRate))) // Raw sounds with different sample rates may not share buffers, even if they use the same source data.
|
(!sfx->bLoadRAW || (sfx->RawRate == S_sfx[i].RawRate))) // Raw sounds with different sample rates may not share buffers, even if they use the same source data.
|
||||||
{
|
{
|
||||||
//DPrintf (DMSG_NOTIFY, "Linked %s to %s (%d)\n", sfx->name.GetChars(), S_sfx[i].name.GetChars(), i);
|
DPrintf (DMSG_NOTIFY, "Linked %s to %s (%d)\n", sfx->name.GetChars(), S_sfx[i].name.GetChars(), i);
|
||||||
sfx->link = i;
|
sfx->link = i;
|
||||||
// This is necessary to avoid using the rolloff settings of the linked sound if its
|
// This is necessary to avoid using the rolloff settings of the linked sound if its
|
||||||
// settings are different.
|
// settings are different.
|
||||||
|
@ -733,7 +737,7 @@ sfxinfo_t *SoundEngine::LoadSound(sfxinfo_t *sfx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//DPrintf(DMSG_NOTIFY, "Loading sound \"%s\" (%td)\n", sfx->name.GetChars(), sfx - &S_sfx[0]);
|
DPrintf(DMSG_NOTIFY, "Loading sound \"%s\" (%td)\n", sfx->name.GetChars(), sfx - &S_sfx[0]);
|
||||||
|
|
||||||
auto sfxdata = ReadSound(sfx->lumpnum);
|
auto sfxdata = ReadSound(sfx->lumpnum);
|
||||||
int size = sfxdata.Size();
|
int size = sfxdata.Size();
|
||||||
|
|
Loading…
Reference in a new issue