This broke emulators/citra and games/alephone and I think the addition
of AL_API_NOEXCEPT17 to numerous callback types requires a major bump.
citra:
/exopi-obj/pobj/citra-0.0.0.2104/citra-unified-source-20240303-0ff3440/src/audio_core/openal_sink.cpp:76:80: error: cannot initialize a parameter of type 'ALBUFFERCALLBACKTYPESOFT' (aka 'int (*)(void *, void *, int) noexcept') with an rvalue of type 'ALsizei (*)(void *, void *, ALsizei)' (aka 'int (*)(void *, void *, int)'): different exception specifications
alBufferCallbackSOFT(impl->buffer, AL_FORMAT_STEREO16, native_sample_rate, &Impl::Callback,
^~~~~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.
alephone:
/usr/local/include/AL/alext.h:821:90: error: expected ')'
typedef void (AL_APIENTRY *LPALGENEFFECTSDIRECT)(ALCcontext *context, ALsizei n, ALuint *effects) AL_API_NOEXCEPT17;
^
../../Source_Files/GameWorld/effects.h:156:28: note: expanded from macro 'effects'
#define effects (EffectList.data())
^
citra builds with the following diff.
Alephone may need renaming of the effects macro, which might be a bit
intrusive/annoying.
Index: patches/patch-src_audio_core_openal_sink_cpp
===================================================================
RCS file: patches/patch-src_audio_core_openal_sink_cpp
diff -N patches/patch-src_audio_core_openal_sink_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_audio_core_openal_sink_cpp 1 Feb 2025 05:23:43 -0000
@@ -0,0 +1,21 @@
+Index: src/audio_core/openal_sink.cpp
+--- src/audio_core/openal_sink.cpp.orig
++++ src/audio_core/openal_sink.cpp
+@@ -22,7 +22,7 @@ struct OpenALSink::Impl {
+
+ std::function<void(s16*, std::size_t)> cb;
+
+- static ALsizei Callback(void* impl_, void* buffer, ALsizei buffer_size_in_bytes);
++ static ALsizei Callback(void* impl_, void* buffer, ALsizei buffer_size_in_bytes) AL_API_NOEXCEPT17;
+ };
+
+ OpenALSink::OpenALSink(std::string device_name) : impl(std::make_unique<Impl>()) {
+@@ -142,7 +142,7 @@ void OpenALSink::SetCallback(std::function<void(s16*,
+ impl->cb = cb;
+ }
+
+-ALsizei OpenALSink::Impl::Callback(void* impl_, void* buffer, ALsizei buffer_size_in_bytes) {
++ALsizei OpenALSink::Impl::Callback(void* impl_, void* buffer, ALsizei buffer_size_in_bytes) AL_API_NOEXCEPT17 {
+ auto impl = reinterpret_cast<Impl*>(impl_);
+ if (!impl || !impl->cb) {
+ return 0;
No comments:
Post a Comment