update OpenAL-Soft to 1.24.3.

This commit is contained in:
Sasha Szpakowski
2025-05-03 12:51:37 -03:00
parent 375c6f88cd
commit 5e4f3241ac
322 changed files with 54386 additions and 12885 deletions
+11
View File
@@ -1,6 +1,7 @@
#ifndef AL_BIT_H
#define AL_BIT_H
#include <algorithm>
#include <array>
#ifndef __GNUC__
#include <cstdint>
@@ -25,6 +26,16 @@ To> bit_cast(const From &src) noexcept
return *std::launder(reinterpret_cast<To*>(dst.data()));
}
template<typename T>
std::enable_if_t<std::is_integral_v<T>,
T> byteswap(T value) noexcept
{
static_assert(std::has_unique_object_representations_v<T>);
auto bytes = al::bit_cast<std::array<std::byte,sizeof(T)>>(value);
std::reverse(bytes.begin(), bytes.end());
return al::bit_cast<T>(bytes);
}
#ifdef __BYTE_ORDER__
enum class endian {
little = __ORDER_LITTLE_ENDIAN__,