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

@ -23,8 +23,6 @@
#ifndef _SFXNULLDEVICE_H_
#define _SFXNULLDEVICE_H_
class SFXProvider;
#ifndef _SFXDEVICE_H_
#include "sfx/sfxDevice.h"
#endif
@ -37,27 +35,28 @@ class SFXProvider;
#ifndef _SFXNULLVOICE_H_
#include "sfx/null/sfxNullVoice.h"
#endif
#ifndef _SFXSYSTEM_H_
#include "sfx/sfxSystem.h"
#endif
class SFXNullDevice : public SFXDevice
{
typedef SFXDevice Parent;
protected:
static SFXProvider::CreateProviderInstanceDelegate mCreateDeviceInstance;
public:
public:
static void enumerateProviders(Vector<SFXProvider*>& providerList);
SFXNullDevice( U32 providerIndex );
static SFXDevice* createInstance(U32 adapterIndex);
virtual ~SFXNullDevice();
SFXNullDevice( SFXProvider* provider,
String name,
bool useHardware,
S32 maxBuffers );
public:
virtual ~SFXNullDevice();
public:
// SFXDevice.
SFXBuffer* createBuffer( const ThreadSafeRef< SFXStream >& stream, SFXDescription* description ) override;
SFXVoice* createVoice( bool is3D, SFXBuffer *buffer ) override;
void update() override;
// SFXDevice.
SFXBuffer* createBuffer( const ThreadSafeRef< SFXStream >& stream, SFXDescription* description ) override;
SFXVoice* createVoice( bool is3D, SFXBuffer *buffer ) override;
void update() override;
};
#endif // _SFXNULLDEVICE_H_
#endif // _SFXNULLDEVICE_H_