Update OpenAL-soft to 1.23.1-bc7cb17.

This commit is contained in:
Miku AuahDark
2024-03-20 11:06:03 +08:00
parent 4a512be715
commit 73a6fc9196
294 changed files with 44342 additions and 40077 deletions
+15
View File
@@ -1,8 +1,13 @@
#ifndef AL_BIT_H
#define AL_BIT_H
#include <array>
#ifndef __GNUC__
#include <cstdint>
#endif
#include <cstring>
#include <limits>
#include <new>
#include <type_traits>
#if !defined(__GNUC__) && (defined(_WIN32) || defined(_WIN64))
#include <intrin.h>
@@ -10,6 +15,16 @@
namespace al {
template<typename To, typename From>
std::enable_if_t<sizeof(To) == sizeof(From) && std::is_trivially_copyable_v<From>
&& std::is_trivially_copyable_v<To>,
To> bit_cast(const From &src) noexcept
{
alignas(To) std::array<char,sizeof(To)> dst;
std::memcpy(dst.data(), &src, sizeof(To));
return *std::launder(reinterpret_cast<To*>(dst.data()));
}
#ifdef __BYTE_ORDER__
enum class endian {
little = __ORDER_LITTLE_ENDIAN__,