mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 11:40:44 +00:00
- fixed the real issue for the sound problems and reverted the last commit.
It was far more serious than a botched merge.
This commit is contained in:
parent
5973391a51
commit
47e452f452
3 changed files with 8 additions and 12 deletions
|
@ -1536,6 +1536,7 @@ int SoundEngine::AddSoundLump(const char* logicalname, int lump, int CurrentPitc
|
|||
newsfx.PitchMask = CurrentPitchMask;
|
||||
newsfx.NearLimit = nearlimit;
|
||||
newsfx.ResourceId = resid;
|
||||
newsfx.bTentative = false;
|
||||
|
||||
if (resid >= 0) ResIdMap[resid] = S_sfx.Size() - 1;
|
||||
return (int)S_sfx.Size()-1;
|
||||
|
|
2
source/common/thirdparty/m_crc32.h
vendored
2
source/common/thirdparty/m_crc32.h
vendored
|
@ -31,7 +31,7 @@
|
|||
**---------------------------------------------------------------------------
|
||||
**
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <zlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
|
|
@ -191,22 +191,17 @@ int LoadSound(const char* name)
|
|||
auto lump = S_LookupSound(filename);
|
||||
if (lump > 0)
|
||||
{
|
||||
auto &S_sfx = soundEngine->GetSounds();
|
||||
S_sfx.Reserve(1);
|
||||
int retval = S_sfx.Size() - 2;
|
||||
auto check = fileSystem.GetFileData(lump);
|
||||
bool loops = false;
|
||||
if (check.Size() > 26 && check[26] == 6 && !memcmp("Creative Voice File", check.Data(), 19))
|
||||
{
|
||||
// This game uses the actual loop point information in the sound data as its only means to check if a sound is looped.
|
||||
looped[retval] = true;
|
||||
loops = true;
|
||||
}
|
||||
auto& newsfx = S_sfx.Last();
|
||||
newsfx.name = nname;
|
||||
newsfx.lumpnum = lump;
|
||||
newsfx.NearLimit = 6;
|
||||
newsfx.bTentative = false;
|
||||
soundEngine->CacheSound(retval + 1);
|
||||
return retval;
|
||||
int retval = soundEngine->AddSoundLump(nname, lump, 0, -1, 6);
|
||||
soundEngine->CacheSound(retval);
|
||||
looped[retval-1] = loops;
|
||||
return retval - 1;
|
||||
}
|
||||
else if (!ISDEMOVER) // demo tries to load sound files it doesn't have
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue