Skip to content
Permalink
Browse files

- fixed ambient sounds "leaking" into reverb environment

Set speed of sound to 343.3 and init scale to 1 according to @kcat suggestion

https://forum.zdoom.org/viewtopic.php?t=63185
https://forum.zdoom.org/viewtopic.php?t=63524
  • Loading branch information...
alexey-lysiuk committed Feb 5, 2019
1 parent 2f161a0 commit 69492b1e273f30a9bca1d0a11b41e7067d952637
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/sound/oalsound.cpp
@@ -824,12 +824,12 @@ OpenALSoundRenderer::OpenALSoundRenderer()

// Speed of sound is in units per second. Presuming we want to simulate a
// typical speed of sound of 343.3 meters per second, multiply it by the
// units per meter scale (32?), and set the meters per unit to the scale's
// units per meter scale (1), and set the meters per unit to the scale's
// reciprocal. It's important to set these correctly for both doppler
// effects and reverb.
alSpeedOfSound(343.3f * 32.0f);
alSpeedOfSound(343.3f);
if(ALC.EXT_EFX)
alListenerf(AL_METERS_PER_UNIT, 1.0f/32.0f);
alListenerf(AL_METERS_PER_UNIT, 1.0f);

alDistanceModel(AL_INVERSE_DISTANCE);
if(AL.EXT_source_distance_model)

0 comments on commit 69492b1

Please sign in to comment.
You can’t perform that action at this time.