mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 09:04:38 +00:00
update openal-soft to 1.24.3
keeping the alt 87514151c4 (diff-73a8dc1ce58605f6c5ea53548454c3bae516ec5132a29c9d7ff7edf9730c75be)
This commit is contained in:
parent
12db0500e8
commit
ba32094b7b
276 changed files with 49304 additions and 8712 deletions
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef ALC_DEVICE_H
|
||||
#define ALC_DEVICE_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
|
|
@ -18,7 +20,7 @@
|
|||
#include "core/device.h"
|
||||
#include "intrusive_ptr.h"
|
||||
|
||||
#ifdef ALSOFT_EAX
|
||||
#if ALSOFT_EAX
|
||||
#include "al/eax/x_ram.h"
|
||||
#endif // ALSOFT_EAX
|
||||
|
||||
|
|
@ -30,7 +32,11 @@ struct FilterSubList;
|
|||
using uint = unsigned int;
|
||||
|
||||
|
||||
struct ALCdevice : public al::intrusive_ref<ALCdevice>, DeviceBase {
|
||||
struct ALCdevice { virtual ~ALCdevice() = default; };
|
||||
|
||||
namespace al {
|
||||
|
||||
struct Device final : public ALCdevice, al::intrusive_ref<al::Device>, DeviceBase {
|
||||
/* This lock protects the device state (format, update size, etc) from
|
||||
* being from being changed in multiple threads, or being accessed while
|
||||
* being changed. It's also used to serialize calls to the backend.
|
||||
|
|
@ -80,7 +86,7 @@ struct ALCdevice : public al::intrusive_ref<ALCdevice>, DeviceBase {
|
|||
std::mutex FilterLock;
|
||||
std::vector<FilterSubList> FilterList;
|
||||
|
||||
#ifdef ALSOFT_EAX
|
||||
#if ALSOFT_EAX
|
||||
ALuint eax_x_ram_free_size{eax_x_ram_max_size};
|
||||
#endif // ALSOFT_EAX
|
||||
|
||||
|
|
@ -89,35 +95,41 @@ struct ALCdevice : public al::intrusive_ref<ALCdevice>, DeviceBase {
|
|||
std::unordered_map<ALuint,std::string> mEffectNames;
|
||||
std::unordered_map<ALuint,std::string> mFilterNames;
|
||||
|
||||
ALCdevice(DeviceType type);
|
||||
~ALCdevice();
|
||||
std::string mVendorOverride;
|
||||
std::string mVersionOverride;
|
||||
std::string mRendererOverride;
|
||||
|
||||
explicit Device(DeviceType type);
|
||||
~Device() final;
|
||||
|
||||
void enumerateHrtfs();
|
||||
|
||||
bool getConfigValueBool(const std::string_view block, const std::string_view key, bool def)
|
||||
{ return GetConfigValueBool(DeviceName, block, key, def); }
|
||||
{ return GetConfigValueBool(mDeviceName, block, key, def); }
|
||||
|
||||
template<typename T>
|
||||
inline std::optional<T> configValue(const std::string_view block, const std::string_view key) = delete;
|
||||
auto configValue(const std::string_view block, const std::string_view key) -> std::optional<T> = delete;
|
||||
};
|
||||
|
||||
template<>
|
||||
inline std::optional<std::string> ALCdevice::configValue(const std::string_view block, const std::string_view key)
|
||||
{ return ConfigValueStr(DeviceName, block, key); }
|
||||
template<>
|
||||
inline std::optional<int> ALCdevice::configValue(const std::string_view block, const std::string_view key)
|
||||
{ return ConfigValueInt(DeviceName, block, key); }
|
||||
template<>
|
||||
inline std::optional<uint> ALCdevice::configValue(const std::string_view block, const std::string_view key)
|
||||
{ return ConfigValueUInt(DeviceName, block, key); }
|
||||
template<>
|
||||
inline std::optional<float> ALCdevice::configValue(const std::string_view block, const std::string_view key)
|
||||
{ return ConfigValueFloat(DeviceName, block, key); }
|
||||
template<>
|
||||
inline std::optional<bool> ALCdevice::configValue(const std::string_view block, const std::string_view key)
|
||||
{ return ConfigValueBool(DeviceName, block, key); }
|
||||
template<> inline
|
||||
auto Device::configValue(const std::string_view block, const std::string_view key) -> std::optional<std::string>
|
||||
{ return ConfigValueStr(mDeviceName, block, key); }
|
||||
template<> inline
|
||||
auto Device::configValue(const std::string_view block, const std::string_view key) -> std::optional<int>
|
||||
{ return ConfigValueInt(mDeviceName, block, key); }
|
||||
template<> inline
|
||||
auto Device::configValue(const std::string_view block, const std::string_view key) -> std::optional<uint>
|
||||
{ return ConfigValueUInt(mDeviceName, block, key); }
|
||||
template<> inline
|
||||
auto Device::configValue(const std::string_view block, const std::string_view key) -> std::optional<float>
|
||||
{ return ConfigValueFloat(mDeviceName, block, key); }
|
||||
template<> inline
|
||||
auto Device::configValue(const std::string_view block, const std::string_view key) -> std::optional<bool>
|
||||
{ return ConfigValueBool(mDeviceName, block, key); }
|
||||
|
||||
} // namespace al
|
||||
|
||||
/** Stores the latest ALC device error. */
|
||||
void alcSetError(ALCdevice *device, ALCenum errorCode);
|
||||
void alcSetError(al::Device *device, ALCenum errorCode);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue