Skip to content

Draft: OpenAL doppler effect

Epoch requested to merge EpochWon/openmw:master into master

Enables the OpenAL doppler effect for 3d sounds. Doppler strength is controlled by a new setting in the launcher under the Audio tab.

Here is the effect at full strength (1.0):

Doppler_full_strength

and at half strength (0.5):

Doppler_half_strength

Default is set to 0.25 since it can sound a bit bad at higher strength, but its configurable.

Issues/Questions:

  • Currently it only applies doppler based on the player velocity, with object velocity still hard coded to be 0. I don't think any objects are capable of moving a playing sound to necessitate adding object velocity, but its something to be aware of.
  • Speed of sound is technically correct as the variable was already set up but unused, but it sounds weird at higher settings because of how fast you are able to move.
  • Not sure if the way I expose the player velocity is the best way of doing it.
  • This applies doppler to every 3d sound, ideally it should be configurable on a per-sound basis, not sure of the design for this.

Prefer not to merge this until we know what/whether to do with lua.

Special thanks to S3ctor for helping me with this 😄

Merge request reports