SFX API Changes

DSound has since been deprecated and xaudio2 would require us to write our own 3d spatialization and mixer
Load devices the same way we load in the gfx end
setup sfx provider
run sfx devices on startup
various fixes around sfx null device
added the bitrate and samplerate globals
added the hrtf global code is in to use this but not setup yet
Adds speed of sound to the sound system
SFXAmbience now has a property for speed of sound for different mediums, can also be set directly
This commit is contained in:
marauder2k7 2026-03-13 08:05:42 +00:00
parent 54b6c3ec47
commit d56bf257c7
53 changed files with 1870 additions and 6401 deletions

View file

@ -61,6 +61,9 @@ class SFXAmbience : public SimDataBlock
/// Doppler shift factor for this space.
F32 mDopplerFactor;
/// Speed of sound for this space.
F32 mSpeedOfSound;
/// Rolloff factor for this space. Only applies to logarithmic distance model.
F32 mRolloffFactor;
@ -90,6 +93,8 @@ class SFXAmbience : public SimDataBlock
/// Return the doppler shift factor to apply in this space.
F32 getDopplerFactor() const { return mDopplerFactor; }
F32 getSpeedOfSound() const { return mSpeedOfSound; }
/// Return the reverb environment of the ambient space.
SFXEnvironment* getEnvironment() const { return mEnvironment; }