- the fourth.

This commit is contained in:
Christoph Oelckers 2017-03-08 18:47:52 +01:00
commit 8ab562ef13
107 changed files with 1041 additions and 1041 deletions

View file

@ -131,7 +131,7 @@ FSoundChan *Channels;
FSoundChan *FreeChannels;
FRolloffInfo S_Rolloff;
BYTE *S_SoundCurve;
uint8_t *S_SoundCurve;
int S_SoundCurveSize;
FBoolCVar noisedebug ("noise", false, 0); // [RH] Print sound debugging info?
@ -301,7 +301,7 @@ void S_Init ()
if (curvelump >= 0)
{
S_SoundCurveSize = Wads.LumpLength (curvelump);
S_SoundCurve = new BYTE[S_SoundCurveSize];
S_SoundCurve = new uint8_t[S_SoundCurveSize];
Wads.ReadLump(curvelump, S_SoundCurve);
}
@ -1398,7 +1398,7 @@ sfxinfo_t *S_LoadSound(sfxinfo_t *sfx)
if (size > 0)
{
FWadLump wlump = Wads.OpenLumpNum(sfx->lumpnum);
BYTE *sfxdata = new BYTE[size];
uint8_t *sfxdata = new uint8_t[size];
wlump.Read(sfxdata, size);
int32_t dmxlen = LittleLong(((int32_t *)sfxdata)[1]);
std::pair<SoundHandle,bool> snd;
@ -1414,9 +1414,9 @@ sfxinfo_t *S_LoadSound(sfxinfo_t *sfx)
snd = GSnd->LoadSoundRaw(sfxdata, size, sfx->RawRate, 1, 8, sfx->LoopStart);
}
// Otherwise, try the sound as DMX format.
else if (((BYTE *)sfxdata)[0] == 3 && ((BYTE *)sfxdata)[1] == 0 && dmxlen <= size - 8)
else if (((uint8_t *)sfxdata)[0] == 3 && ((uint8_t *)sfxdata)[1] == 0 && dmxlen <= size - 8)
{
int frequency = LittleShort(((WORD *)sfxdata)[1]);
int frequency = LittleShort(((uint16_t *)sfxdata)[1]);
if (frequency == 0) frequency = 11025;
snd = GSnd->LoadSoundRaw(sfxdata+8, dmxlen, frequency, 1, 8, sfx->LoopStart);
}
@ -1458,7 +1458,7 @@ static void S_LoadSound3D(sfxinfo_t *sfx)
if(size <= 0) return;
FWadLump wlump = Wads.OpenLumpNum(sfx->lumpnum);
BYTE *sfxdata = new BYTE[size];
uint8_t *sfxdata = new uint8_t[size];
wlump.Read(sfxdata, size);
int32_t dmxlen = LittleLong(((int32_t *)sfxdata)[1]);
std::pair<SoundHandle,bool> snd;
@ -1474,9 +1474,9 @@ static void S_LoadSound3D(sfxinfo_t *sfx)
snd = GSnd->LoadSoundRaw(sfxdata, size, sfx->RawRate, 1, 8, sfx->LoopStart, true);
}
// Otherwise, try the sound as DMX format.
else if (((BYTE *)sfxdata)[0] == 3 && ((BYTE *)sfxdata)[1] == 0 && dmxlen <= size - 8)
else if (((uint8_t *)sfxdata)[0] == 3 && ((uint8_t *)sfxdata)[1] == 0 && dmxlen <= size - 8)
{
int frequency = LittleShort(((WORD *)sfxdata)[1]);
int frequency = LittleShort(((uint16_t *)sfxdata)[1]);
if (frequency == 0) frequency = 11025;
snd = GSnd->LoadSoundRaw(sfxdata+8, dmxlen, frequency, 1, 8, sfx->LoopStart, -1, true);
}