From 9ff1bcbae0c94b3a6766595e8abbf7be990aebb8 Mon Sep 17 00:00:00 2001 From: Reg Tiangha Date: Thu, 21 Mar 2024 14:27:37 -0600 Subject: [PATCH] fix build error with modern openal-soft --- src/audio_core/openal_sink.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/audio_core/openal_sink.cpp b/src/audio_core/openal_sink.cpp index 3129910fd..9f9941f63 100644 --- a/src/audio_core/openal_sink.cpp +++ b/src/audio_core/openal_sink.cpp @@ -73,8 +73,9 @@ OpenALSink::OpenALSink(std::string device_name) : impl(std::make_unique()) auto alBufferCallbackSOFT = reinterpret_cast(alGetProcAddress("alBufferCallbackSOFT")); - alBufferCallbackSOFT(impl->buffer, AL_FORMAT_STEREO16, native_sample_rate, &Impl::Callback, - impl.get()); + alBufferCallbackSOFT(impl->buffer, AL_FORMAT_STEREO16, native_sample_rate, + reinterpret_cast(&Impl::Callback), impl.get()); + if (alGetError() != AL_NO_ERROR) { LOG_CRITICAL(Audio_Sink, "alBufferCallbackSOFT failed: {}", alGetError()); Close();