mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
Fixed silent sounds on first play, stereo and precached only
https://mantis.zdoom.org/view.php?id=637
This commit is contained in:
parent
79654fa15b
commit
be496a89d9
1 changed files with 5 additions and 4 deletions
|
@ -1488,9 +1488,11 @@ static void S_LoadSound3D(sfxinfo_t *sfx, FSoundLoadBuffer *pBuffer)
|
|||
|
||||
DPrintf(DMSG_NOTIFY, "Loading monoized sound \"%s\" (%td)\n", sfx->name.GetChars(), sfx - &S_sfx[0]);
|
||||
|
||||
std::pair<SoundHandle, bool> snd;
|
||||
|
||||
if (pBuffer->mBuffer.Size() > 0)
|
||||
{
|
||||
GSnd->LoadSoundBuffered(pBuffer, true);
|
||||
snd = GSnd->LoadSoundBuffered(pBuffer, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1501,7 +1503,6 @@ static void S_LoadSound3D(sfxinfo_t *sfx, FSoundLoadBuffer *pBuffer)
|
|||
uint8_t *sfxdata = new uint8_t[size];
|
||||
wlump.Read(sfxdata, size);
|
||||
int32_t dmxlen = LittleLong(((int32_t *)sfxdata)[1]);
|
||||
std::pair<SoundHandle, bool> snd;
|
||||
|
||||
// If the sound is voc, use the custom loader.
|
||||
if (strncmp((const char *)sfxdata, "Creative Voice File", 19) == 0)
|
||||
|
@ -1526,9 +1527,9 @@ static void S_LoadSound3D(sfxinfo_t *sfx, FSoundLoadBuffer *pBuffer)
|
|||
snd = GSnd->LoadSound(sfxdata, size, true, pBuffer);
|
||||
}
|
||||
delete[] sfxdata;
|
||||
|
||||
sfx->data3d = snd.first;
|
||||
}
|
||||
|
||||
sfx->data3d = snd.first;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
Loading…
Reference in a new issue