mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-02-03 04:10:57 +00:00
- did some tweaks to the sound.
The angle was wrong and the rolloff type apparently as well. It sounds a lot better now, especially after also altering the minimum distance for the rolloff. This one is interesting, it looks like a bug where the desired value was shifted two bits too much, quadrupling the distance where volume reduction starts.
This commit is contained in:
parent
22ef66209d
commit
c9198729b0
1 changed files with 4 additions and 2 deletions
|
@ -43,7 +43,9 @@ class DukeSoundEngine : public SoundEngine
|
||||||
public:
|
public:
|
||||||
DukeSoundEngine()
|
DukeSoundEngine()
|
||||||
{
|
{
|
||||||
S_Rolloff = { ROLLOFF_Linear, 576, 1088 }; // These are the original values derived from the DN3D source, but the lower end looks like a bug. Needs checking and maybe an option.
|
S_Rolloff.RolloffType = ROLLOFF_Doom; // Seems like Duke uses the same rolloff type as Doom.
|
||||||
|
S_Rolloff.MinDistance = 144; // was originally 576 which looks like a bug and sounds like crap.
|
||||||
|
S_Rolloff.MaxDistance = 1088;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -353,7 +355,7 @@ void S_Update(void)
|
||||||
|
|
||||||
if (c != nullptr)
|
if (c != nullptr)
|
||||||
{
|
{
|
||||||
listener.angle = (float)ca * pi::pi() / 2048; // todo: Check value range for angle.
|
listener.angle = (float)ca * pi::pi() / 1024; // Build uses a period of 2048.
|
||||||
listener.velocity.Zero();
|
listener.velocity.Zero();
|
||||||
listener.position = { c->x / 16.f, c->z / 256.f, -c->y / 16.f };
|
listener.position = { c->x / 16.f, c->z / 256.f, -c->y / 16.f };
|
||||||
listener.underwater = false;
|
listener.underwater = false;
|
||||||
|
|
Loading…
Reference in a new issue