update to openal-1.25.1, from Brad, ok David Carlier (maintainer)

This commit is contained in:
sthen
2026-02-18 14:38:00 +00:00
parent 74a1f395fa
commit 7817fa1be8
14 changed files with 12 additions and 252 deletions
+5 -5
View File
@@ -1,6 +1,6 @@
COMMENT = cross-platform 3D audio API
V = 1.24.3
V = 1.25.1
DISTNAME = openal-soft-$V
PKGNAME = openal-$V
EPOCH = 0
@@ -8,9 +8,9 @@ CATEGORIES = audio
SHARED_LIBS = openal 6.0
HOMEPAGE = http://openal-soft.org/
HOMEPAGE = https://openal-soft.org/
SITES = https://github.com/kcat/openal-soft/releases/download/$V/
SITES = ${HOMEPAGE}openal-releases/
EXTRACT_SUFX = .tar.bz2
MAINTAINER = David Carlier <devnexen@gmail.com>
@@ -18,9 +18,9 @@ MAINTAINER = David Carlier <devnexen@gmail.com>
# LGPLv2+
PERMIT_PACKAGE =Yes
WANTLIB += c m mysofa pthread sndio z ${COMPILER_LIBCXX}
WANTLIB += c m mysofa pthread sndio ${COMPILER_LIBCXX}
LIB_DEPENDS += audio/libmysofa>=1.3.3
LIB_DEPENDS += audio/libmysofa
CONFIGURE_ARGS =-DALSOFT_BACKEND_PIPEWIRE=Off \
-DALSOFT_BACKEND_WAVE=Off \
+2 -2
View File
@@ -1,2 +1,2 @@
SHA256 (openal-soft-1.24.3.tar.bz2) = y15hl6HA2g7c8qgQJJU8yPqFRcO5R05IyFKvcJ1YeJI=
SIZE (openal-soft-1.24.3.tar.bz2) = 1025568
SHA256 (openal-soft-1.25.1.tar.bz2) = TCr/b4GXX0bsxRSNCSxJSMcdv7duS5ukvx/OKH9H1LU=
SIZE (openal-soft-1.25.1.tar.bz2) = 1119330
+1 -19
View File
@@ -1,25 +1,7 @@
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -165,7 +165,7 @@ add_subdirectory(fmt-11.1.1 EXCLUDE_FROM_ALL)
set(CPP_DEFS ) # C pre-processor, not C++
set(INC_PATHS )
set(C_FLAGS )
-set(LINKER_FLAGS )
+set(LINKER_FLAGS $<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>)
set(LINKER_FLAGS_DEBUG )
set(LINKER_FLAGS_RELEASE )
set(EXTRA_LIBS )
@@ -1402,7 +1402,7 @@ target_include_directories(alsoft.common PRIVATE ${Ope
PUBLIC ${OpenAL_BINARY_DIR} ${OpenAL_SOURCE_DIR}/common)
target_compile_definitions(alsoft.common PRIVATE ${CPP_DEFS})
target_compile_options(alsoft.common PRIVATE ${C_FLAGS})
-target_link_libraries(alsoft.common PRIVATE alsoft::fmt)
+target_link_libraries(alsoft.common PRIVATE ${LINKER_FLAGS} alsoft::fmt)
set_target_properties(alsoft.common PROPERTIES ${ALSOFT_STD_VERSION_PROPS}
POSITION_INDEPENDENT_CODE TRUE)
@@ -1676,7 +1676,7 @@ endif()
@@ -1883,7 +1883,7 @@ endif()
if(ALSOFT_INSTALL_CONFIG)
install(FILES alsoftrc.sample
@@ -1,18 +0,0 @@
gcc8: error: expression '<throw-expression>' is not a constant expression
Index: al/auxeffectslot.cpp
--- al/auxeffectslot.cpp.orig
+++ al/auxeffectslot.cpp
@@ -241,9 +241,10 @@ constexpr auto EffectSlotTypeFromEnum(ALenum type) noe
case AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT: return EffectSlotType::Dedicated;
case AL_EFFECT_DEDICATED_DIALOGUE: return EffectSlotType::Dedicated;
case AL_EFFECT_CONVOLUTION_SOFT: return EffectSlotType::Convolution;
+ default:
+ ERR("Unhandled effect enum: {:#04x}", as_unsigned(type));
+ return EffectSlotType::None;
}
- ERR("Unhandled effect enum: {:#04x}", as_unsigned(type));
- return EffectSlotType::None;
}
[[nodiscard]]
-33
View File
@@ -1,33 +0,0 @@
gcc8: error: expression '<throw-expression>' is not a constant expression
Index: al/buffer.cpp
--- al/buffer.cpp.orig
+++ al/buffer.cpp
@@ -87,9 +87,10 @@ constexpr auto EnumFromAmbiLayout(AmbiLayout layout) -
{
case AmbiLayout::FuMa: return AL_FUMA_SOFT;
case AmbiLayout::ACN: return AL_ACN_SOFT;
+ default:
+ throw std::runtime_error{fmt::format("Invalid AmbiLayout: {}",
+ int{al::to_underlying(layout)})};
}
- throw std::runtime_error{fmt::format("Invalid AmbiLayout: {}",
- int{al::to_underlying(layout)})};
}
constexpr auto AmbiScalingFromEnum(ALenum scale) noexcept -> std::optional<AmbiScaling>
@@ -109,10 +110,11 @@ constexpr auto EnumFromAmbiScaling(AmbiScaling scale)
case AmbiScaling::FuMa: return AL_FUMA_SOFT;
case AmbiScaling::SN3D: return AL_SN3D_SOFT;
case AmbiScaling::N3D: return AL_N3D_SOFT;
- case AmbiScaling::UHJ: break;
+ case AmbiScaling::UHJ:
+ default:
+ throw std::runtime_error{fmt::format("Invalid AmbiScaling: {}",
+ int{al::to_underlying(scale)})};
}
- throw std::runtime_error{fmt::format("Invalid AmbiScaling: {}",
- int{al::to_underlying(scale)})};
}
#if ALSOFT_EAX
-44
View File
@@ -1,44 +0,0 @@
gcc8: error: expression '<throw-expression>' is not a constant expression
Index: al/debug.cpp
--- al/debug.cpp.orig
+++ al/debug.cpp
@@ -109,9 +109,10 @@ constexpr auto GetDebugSourceEnum(DebugSource source)
case DebugSource::ThirdParty: return AL_DEBUG_SOURCE_THIRD_PARTY_EXT;
case DebugSource::Application: return AL_DEBUG_SOURCE_APPLICATION_EXT;
case DebugSource::Other: return AL_DEBUG_SOURCE_OTHER_EXT;
+ default:
+ throw std::runtime_error{fmt::format("Unexpected debug source value: {}",
+ int{al::to_underlying(source)})};
}
- throw std::runtime_error{fmt::format("Unexpected debug source value: {}",
- int{al::to_underlying(source)})};
}
constexpr auto GetDebugTypeEnum(DebugType type) -> ALenum
@@ -127,9 +128,10 @@ constexpr auto GetDebugTypeEnum(DebugType type) -> ALe
case DebugType::PushGroup: return AL_DEBUG_TYPE_PUSH_GROUP_EXT;
case DebugType::PopGroup: return AL_DEBUG_TYPE_POP_GROUP_EXT;
case DebugType::Other: return AL_DEBUG_TYPE_OTHER_EXT;
+ default:
+ throw std::runtime_error{fmt::format("Unexpected debug type value: {}",
+ int{al::to_underlying(type)})};
}
- throw std::runtime_error{fmt::format("Unexpected debug type value: {}",
- int{al::to_underlying(type)})};
}
constexpr auto GetDebugSeverityEnum(DebugSeverity severity) -> ALenum
@@ -140,9 +142,10 @@ constexpr auto GetDebugSeverityEnum(DebugSeverity seve
case DebugSeverity::Medium: return AL_DEBUG_SEVERITY_MEDIUM_EXT;
case DebugSeverity::Low: return AL_DEBUG_SEVERITY_LOW_EXT;
case DebugSeverity::Notification: return AL_DEBUG_SEVERITY_NOTIFICATION_EXT;
+ default:
+ throw std::runtime_error{fmt::format("Unexpected debug severity value: {}",
+ int{al::to_underlying(severity)})};
}
- throw std::runtime_error{fmt::format("Unexpected debug severity value: {}",
- int{al::to_underlying(severity)})};
}
@@ -1,18 +0,0 @@
gcc8: error: expression '<throw-expression>' is not a constant expression
Index: al/effects/chorus.cpp
--- al/effects/chorus.cpp.orig
+++ al/effects/chorus.cpp
@@ -43,9 +43,10 @@ constexpr ALenum EnumFromWaveform(ChorusWaveform type)
{
case ChorusWaveform::Sinusoid: return AL_CHORUS_WAVEFORM_SINUSOID;
case ChorusWaveform::Triangle: return AL_CHORUS_WAVEFORM_TRIANGLE;
+ default:
+ throw std::runtime_error{fmt::format("Invalid chorus waveform: {}",
+ int{al::to_underlying(type)})};
}
- throw std::runtime_error{fmt::format("Invalid chorus waveform: {}",
- int{al::to_underlying(type)})};
}
constexpr EffectProps genDefaultChorusProps() noexcept
@@ -1,16 +0,0 @@
gcc8: error: expression '<throw-expression>' is not a constant expression
Index: al/effects/fshifter.cpp
--- al/effects/fshifter.cpp.orig
+++ al/effects/fshifter.cpp
@@ -39,8 +39,9 @@ constexpr ALenum EnumFromDirection(FShifterDirection d
case FShifterDirection::Down: return AL_FREQUENCY_SHIFTER_DIRECTION_DOWN;
case FShifterDirection::Up: return AL_FREQUENCY_SHIFTER_DIRECTION_UP;
case FShifterDirection::Off: return AL_FREQUENCY_SHIFTER_DIRECTION_OFF;
+ default:
+ throw std::runtime_error{fmt::format("Invalid direction: {}", int{al::to_underlying(dir)})};
}
- throw std::runtime_error{fmt::format("Invalid direction: {}", int{al::to_underlying(dir)})};
}
constexpr EffectProps genDefaultProps() noexcept
@@ -1,18 +0,0 @@
gcc8: error: expression '<throw-expression>' is not a constant expression
Index: al/effects/modulator.cpp
--- al/effects/modulator.cpp.orig
+++ al/effects/modulator.cpp
@@ -39,9 +39,10 @@ constexpr ALenum EnumFromWaveform(ModulatorWaveform ty
case ModulatorWaveform::Sinusoid: return AL_RING_MODULATOR_SINUSOID;
case ModulatorWaveform::Sawtooth: return AL_RING_MODULATOR_SAWTOOTH;
case ModulatorWaveform::Square: return AL_RING_MODULATOR_SQUARE;
+ default:
+ throw std::runtime_error{fmt::format("Invalid modulator waveform: {}",
+ int{al::to_underlying(type)})};
}
- throw std::runtime_error{fmt::format("Invalid modulator waveform: {}",
- int{al::to_underlying(type)})};
}
constexpr EffectProps genDefaultProps() noexcept
@@ -1,29 +0,0 @@
gcc8: error: expression '<throw-expression>' is not a constant expression
Index: al/effects/vmorpher.cpp
--- al/effects/vmorpher.cpp.orig
+++ al/effects/vmorpher.cpp
@@ -96,8 +96,9 @@ constexpr ALenum EnumFromPhenome(VMorpherPhenome pheno
HANDLE_PHENOME(T);
HANDLE_PHENOME(V);
HANDLE_PHENOME(Z);
+ default:
+ throw std::runtime_error{fmt::format("Invalid phenome: {}", int{al::to_underlying(phenome)})};
}
- throw std::runtime_error{fmt::format("Invalid phenome: {}", int{al::to_underlying(phenome)})};
#undef HANDLE_PHENOME
}
@@ -118,9 +119,10 @@ constexpr ALenum EnumFromWaveform(VMorpherWaveform typ
case VMorpherWaveform::Sinusoid: return AL_VOCAL_MORPHER_WAVEFORM_SINUSOID;
case VMorpherWaveform::Triangle: return AL_VOCAL_MORPHER_WAVEFORM_TRIANGLE;
case VMorpherWaveform::Sawtooth: return AL_VOCAL_MORPHER_WAVEFORM_SAWTOOTH;
+ default:
+ throw std::runtime_error{fmt::format("Invalid vocal morpher waveform: {}",
+ int{al::to_underlying(type)})};
}
- throw std::runtime_error{fmt::format("Invalid vocal morpher waveform: {}",
- int{al::to_underlying(type)})};
}
constexpr EffectProps genDefaultProps() noexcept
-16
View File
@@ -1,16 +0,0 @@
gcc8: error: expression '<throw-expression>' is not a constant expression
Index: al/state.cpp
--- al/state.cpp.orig
+++ al/state.cpp
@@ -146,8 +146,9 @@ constexpr auto ALenumFromDistanceModel(DistanceModel m
case DistanceModel::LinearClamped: return AL_LINEAR_DISTANCE_CLAMPED;
case DistanceModel::Exponent: return AL_EXPONENT_DISTANCE;
case DistanceModel::ExponentClamped: return AL_EXPONENT_DISTANCE_CLAMPED;
+ default:
+ throw std::runtime_error{"Unexpected distance model "+std::to_string(static_cast<int>(model))};
}
- throw std::runtime_error{"Unexpected distance model "+std::to_string(static_cast<int>(model))};
}
enum PropertyValue : ALenum {
+4 -4
View File
@@ -1,12 +1,12 @@
Index: alc/alconfig.cpp
--- alc/alconfig.cpp.orig
+++ alc/alconfig.cpp
@@ -381,7 +381,7 @@ void ReadALConfig()
@@ -426,7 +426,7 @@ void ReadALConfig()
void ReadALConfig()
{
- fs::path path{"/etc/openal/alsoft.conf"};
+ fs::path path{"${SYSCONFDIR}/openal/alsoft.conf"};
- auto path = fs::path{"/etc/openal/alsoft.conf"};
+ auto path = fs::path{"${SYSCONFDIR}/openal/alsoft.conf"};
TRACE("Loading config {}...", al::u8_as_char(path.u8string()));
if(fs::ifstream f{path}; f.is_open())
if(auto f = fs::ifstream{path}; f.is_open())
@@ -1,16 +0,0 @@
gcc8 is too old for std::reduce
Index: alc/effects/reverb.cpp
--- alc/effects/reverb.cpp.orig
+++ alc/effects/reverb.cpp
@@ -931,8 +931,8 @@ void EarlyReflections::updateLines(const float density
/* Calculate the gain (coefficient) for the secondary reflections based on
* the average delay and decay time.
*/
- const auto length = std::reduce(EARLY_LINE_LENGTHS.begin(), EARLY_LINE_LENGTHS.end(), 0.0f)
- / float{EARLY_LINE_LENGTHS.size()} * density_mult;
+ const auto length = std::accumulate(EARLY_LINE_LENGTHS.begin(), EARLY_LINE_LENGTHS.end(), 0.0f)
+ / static_cast<float>(EARLY_LINE_LENGTHS.size()) * density_mult;
Coeff = CalcDecayCoeff(length, decayTime);
}
@@ -1,14 +0,0 @@
gcc8: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
Index: fmt-11.1.1/CMakeLists.txt
--- fmt-11.1.1/CMakeLists.txt.orig
+++ fmt-11.1.1/CMakeLists.txt
@@ -61,6 +61,8 @@ set(FMT_SOURCES src/format.cc src/os.cc)
add_library(alsoft.fmt OBJECT ${FMT_SOURCES} ${FMT_HEADERS} README.md ChangeLog.md)
add_library(alsoft::fmt ALIAS alsoft.fmt)
+target_link_libraries(alsoft.fmt PRIVATE $<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>)
+
if (cxx_std_11 IN_LIST CMAKE_CXX_COMPILE_FEATURES)
target_compile_features(alsoft.fmt PUBLIC cxx_std_11)
else ()