mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
- Blood: unpositioned sounds must be limited to one per channel.
This commit is contained in:
parent
98ca5d5db4
commit
60fe1d32fb
3 changed files with 6 additions and 10 deletions
|
@ -929,12 +929,7 @@ void SoundEngine::StopSound(int sourcetype, const void* actor, int channel, int
|
|||
void SoundEngine::StopActorSounds(int sourcetype, const void* actor, int chanmin, int chanmax)
|
||||
{
|
||||
const bool all = (chanmin == 0 && chanmax == 0);
|
||||
if (!all && chanmax > chanmin)
|
||||
{
|
||||
const int temp = chanmax;
|
||||
chanmax = chanmin;
|
||||
chanmin = temp;
|
||||
}
|
||||
if (chanmax < chanmin) std::swap(chanmin, chanmax);
|
||||
|
||||
FSoundChan* chan = Channels;
|
||||
while (chan != nullptr)
|
||||
|
|
|
@ -1192,12 +1192,12 @@ void S_SetSoundPaused(int state)
|
|||
if (paused == 0)
|
||||
{
|
||||
S_ResumeSound(true);
|
||||
}
|
||||
if (GSnd != nullptr)
|
||||
{
|
||||
GSnd->SetInactive(SoundRenderer::INACTIVE_Active);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (paused == 0)
|
||||
|
|
|
@ -181,6 +181,7 @@ void sndStartSample(unsigned int nSound, int nVolume, int nChannel, bool bLoop,
|
|||
else nVolume = 255;
|
||||
}
|
||||
if (bLoop) chanflags |= CHANF_LOOP;
|
||||
soundEngine->StopActorSounds(SOURCE_None, nullptr, nChannel + 1, nChannel + 1);
|
||||
soundEngine->StartSound(SOURCE_None, nullptr, nullptr, (nChannel + 1), chanflags, snd, nVolume / 255.f, ATTN_NONE);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue