aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--alc/backends/sdl2.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/alc/backends/sdl2.cpp b/alc/backends/sdl2.cpp
index a4a5a9ac..e1e40e27 100644
--- a/alc/backends/sdl2.cpp
+++ b/alc/backends/sdl2.cpp
@@ -53,8 +53,6 @@ struct Sdl2Backend final : public BackendBase {
~Sdl2Backend() override;
void audioCallback(Uint8 *stream, int len) noexcept;
- static void audioCallbackC(void *ptr, Uint8 *stream, int len) noexcept
- { static_cast<Sdl2Backend*>(ptr)->audioCallback(stream, len); }
void open(const char *name) override;
bool reset() override;
@@ -103,7 +101,8 @@ void Sdl2Backend::open(const char *name)
}
want.channels = (mDevice->FmtChans == DevFmtMono) ? 1 : 2;
want.samples = static_cast<Uint16>(minu(mDevice->UpdateSize, 8192));
- want.callback = &Sdl2Backend::audioCallbackC;
+ want.callback = [](void *ptr, Uint8 *stream, int len) noexcept
+ { return static_cast<Sdl2Backend*>(ptr)->audioCallback(stream, len); };
want.userdata = this;
/* Passing nullptr to SDL_OpenAudioDevice opens a default, which isn't