mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-29 13:00:43 +00:00
- make sure that all of SW's sound function check SoundEnabled().
Fixes #192
This commit is contained in:
parent
7df20ee047
commit
dfc2cd8580
1 changed files with 5 additions and 1 deletions
|
@ -300,6 +300,8 @@ void StartAmbientSound(void)
|
||||||
|
|
||||||
static void RestartAmbient(AmbientSound* amb)
|
static void RestartAmbient(AmbientSound* amb)
|
||||||
{
|
{
|
||||||
|
if (!SoundEnabled()) return;
|
||||||
|
|
||||||
auto& vp = voc[amb->vocIndex];
|
auto& vp = voc[amb->vocIndex];
|
||||||
auto rolloff = GetRolloff(vp.voc_distance);
|
auto rolloff = GetRolloff(vp.voc_distance);
|
||||||
int pitch = 0;
|
int pitch = 0;
|
||||||
|
@ -368,6 +370,8 @@ static void DoTimedSound(AmbientSound* amb)
|
||||||
|
|
||||||
static void UpdateAmbients()
|
static void UpdateAmbients()
|
||||||
{
|
{
|
||||||
|
if (!SoundEnabled()) return;
|
||||||
|
|
||||||
for (auto& amb : ambients)
|
for (auto& amb : ambients)
|
||||||
{
|
{
|
||||||
auto sp = amb->sp;
|
auto sp = amb->sp;
|
||||||
|
@ -807,7 +811,7 @@ int _PlayerSound(int num, PLAYERp pp)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (num < 0 || num >= DIGI_MAX || !soundEngine->isValidSoundId(num))
|
if (num < 0 || num >= DIGI_MAX || !soundEngine->isValidSoundId(num) || !SoundEnabled())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (TEST(pp->Flags, PF_DEAD)) return 0; // You're dead, no talking!
|
if (TEST(pp->Flags, PF_DEAD)) return 0; // You're dead, no talking!
|
||||||
|
|
Loading…
Reference in a new issue