mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
Get rid of the LoadSound3D method
It no longer does anything since there's no separate buffer for 3D sfx.
This commit is contained in:
parent
d823091446
commit
30bdd0c2d4
2 changed files with 0 additions and 49 deletions
|
@ -174,7 +174,6 @@ void SoundEngine::CacheSound (sfxinfo_t *sfx)
|
|||
// Since we do not know in what format the sound will be used, we have to cache both.
|
||||
FSoundLoadBuffer SoundBuffer;
|
||||
LoadSound(sfx, &SoundBuffer);
|
||||
LoadSound3D(sfx, &SoundBuffer);
|
||||
sfx->bUsed = true;
|
||||
}
|
||||
}
|
||||
|
@ -575,7 +574,6 @@ FSoundChan *SoundEngine::StartSound(int type, const void *source,
|
|||
|
||||
if (attenuation > 0 && type != SOURCE_None)
|
||||
{
|
||||
LoadSound3D(sfx, &SoundBuffer);
|
||||
chan = (FSoundChan*)GSnd->StartSound3D (sfx->data, &listener, float(volume), rolloff, float(attenuation), pitch, basepriority, pos, vel, channel, startflags, NULL);
|
||||
}
|
||||
else
|
||||
|
@ -680,7 +678,6 @@ void SoundEngine::RestartChannel(FSoundChan *chan)
|
|||
return;
|
||||
}
|
||||
|
||||
LoadSound3D(sfx, &SoundBuffer);
|
||||
chan->ChanFlags &= ~(CHANF_EVICTED|CHANF_ABSTIME);
|
||||
ochan = (FSoundChan*)GSnd->StartSound3D(sfx->data, &listener, chan->Volume, &chan->Rolloff, chan->DistanceScale, chan->Pitch,
|
||||
chan->Priority, pos, vel, chan->EntChannel, startflags, chan);
|
||||
|
@ -780,51 +777,6 @@ sfxinfo_t *SoundEngine::LoadSound(sfxinfo_t *sfx, FSoundLoadBuffer *pBuffer)
|
|||
return sfx;
|
||||
}
|
||||
|
||||
void SoundEngine::LoadSound3D(sfxinfo_t *sfx, FSoundLoadBuffer *pBuffer)
|
||||
{
|
||||
if (GSnd->IsNull()) return;
|
||||
|
||||
if(sfx->data.isValid())
|
||||
return;
|
||||
|
||||
//DPrintf(DMSG_NOTIFY, "Loading sound \"%s\" (%td)\n", sfx->name.GetChars(), sfx - &S_sfx[0]);
|
||||
|
||||
if (pBuffer->mBuffer.size() > 0)
|
||||
{
|
||||
sfx->data = GSnd->LoadSoundBuffered(pBuffer);
|
||||
}
|
||||
else if (sfx->lumpnum >= 0)
|
||||
{
|
||||
auto sfxdata = ReadSound(sfx->lumpnum);
|
||||
int size = sfxdata.Size();
|
||||
if (size <= 8) return;
|
||||
int32_t dmxlen = LittleLong(((int32_t *)sfxdata.Data())[1]);
|
||||
|
||||
// If the sound is voc, use the custom loader.
|
||||
if (strncmp((const char *)sfxdata.Data(), "Creative Voice File", 19) == 0)
|
||||
{
|
||||
sfx->data = GSnd->LoadSoundVoc(sfxdata.Data(), size);
|
||||
}
|
||||
// If the sound is raw, just load it as such.
|
||||
else if (sfx->bLoadRAW)
|
||||
{
|
||||
sfx->data = GSnd->LoadSoundRaw(sfxdata.Data(), size, sfx->RawRate, 1, 8, sfx->LoopStart);
|
||||
}
|
||||
// Otherwise, try the sound as DMX format.
|
||||
else if (((uint8_t *)sfxdata.Data())[0] == 3 && ((uint8_t *)sfxdata.Data())[1] == 0 && dmxlen <= size - 8)
|
||||
{
|
||||
int frequency = LittleShort(((uint16_t *)sfxdata.Data())[1]);
|
||||
if (frequency == 0) frequency = 11025;
|
||||
sfx->data = GSnd->LoadSoundRaw(sfxdata.Data() + 8, dmxlen, frequency, 1, 8, sfx->LoopStart, -1);
|
||||
}
|
||||
// If that fails, let the sound system try and figure it out.
|
||||
else
|
||||
{
|
||||
sfx->data = GSnd->LoadSound(sfxdata.Data(), size, pBuffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// S_CheckSingular
|
||||
|
|
|
@ -248,7 +248,6 @@ protected:
|
|||
TArray<FRandomSoundList> S_rnd;
|
||||
|
||||
private:
|
||||
void LoadSound3D(sfxinfo_t* sfx, FSoundLoadBuffer* pBuffer);
|
||||
void LinkChannel(FSoundChan* chan, FSoundChan** head);
|
||||
void UnlinkChannel(FSoundChan* chan);
|
||||
void ReturnChannel(FSoundChan* chan);
|
||||
|
|
Loading…
Reference in a new issue