mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +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.PitchMask = CurrentPitchMask;
|
||||||
newsfx.NearLimit = nearlimit;
|
newsfx.NearLimit = nearlimit;
|
||||||
newsfx.ResourceId = resid;
|
newsfx.ResourceId = resid;
|
||||||
|
newsfx.bTentative = false;
|
||||||
|
|
||||||
if (resid >= 0) ResIdMap[resid] = S_sfx.Size() - 1;
|
if (resid >= 0) ResIdMap[resid] = S_sfx.Size() - 1;
|
||||||
return (int)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 <zlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
|
@ -191,22 +191,17 @@ int LoadSound(const char* name)
|
||||||
auto lump = S_LookupSound(filename);
|
auto lump = S_LookupSound(filename);
|
||||||
if (lump > 0)
|
if (lump > 0)
|
||||||
{
|
{
|
||||||
auto &S_sfx = soundEngine->GetSounds();
|
|
||||||
S_sfx.Reserve(1);
|
|
||||||
int retval = S_sfx.Size() - 2;
|
|
||||||
auto check = fileSystem.GetFileData(lump);
|
auto check = fileSystem.GetFileData(lump);
|
||||||
|
bool loops = false;
|
||||||
if (check.Size() > 26 && check[26] == 6 && !memcmp("Creative Voice File", check.Data(), 19))
|
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.
|
// 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();
|
int retval = soundEngine->AddSoundLump(nname, lump, 0, -1, 6);
|
||||||
newsfx.name = nname;
|
soundEngine->CacheSound(retval);
|
||||||
newsfx.lumpnum = lump;
|
looped[retval-1] = loops;
|
||||||
newsfx.NearLimit = 6;
|
return retval - 1;
|
||||||
newsfx.bTentative = false;
|
|
||||||
soundEngine->CacheSound(retval + 1);
|
|
||||||
return retval;
|
|
||||||
}
|
}
|
||||||
else if (!ISDEMOVER) // demo tries to load sound files it doesn't have
|
else if (!ISDEMOVER) // demo tries to load sound files it doesn't have
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue