aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-07-24 18:57:18 -0700
committerChris Robinson <[email protected]>2021-07-24 18:57:18 -0700
commitdf71e428779bb20ffbfaec7e7e763f3747232445 (patch)
treee501ca9e44e09034621f8cdc9acd403a89d9ba60
parentfb1ad483d383eaff520aec1e0a58da935396d99a (diff)
Fix the device sample type in the SDL2 backend
-rw-r--r--alc/backends/sdl2.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/alc/backends/sdl2.cpp b/alc/backends/sdl2.cpp
index fe8ece31..b1f9cf12 100644
--- a/alc/backends/sdl2.cpp
+++ b/alc/backends/sdl2.cpp
@@ -135,12 +135,12 @@ void Sdl2Backend::open(const char *name)
DevFmtType devtype{};
switch(have.format)
{
- case AUDIO_U8: mDevice->FmtType = DevFmtUByte; break;
- case AUDIO_S8: mDevice->FmtType = DevFmtByte; break;
- case AUDIO_U16SYS: mDevice->FmtType = DevFmtUShort; break;
- case AUDIO_S16SYS: mDevice->FmtType = DevFmtShort; break;
- case AUDIO_S32SYS: mDevice->FmtType = DevFmtInt; break;
- case AUDIO_F32SYS: mDevice->FmtType = DevFmtFloat; break;
+ case AUDIO_U8: devtype = DevFmtUByte; break;
+ case AUDIO_S8: devtype = DevFmtByte; break;
+ case AUDIO_U16SYS: devtype = DevFmtUShort; break;
+ case AUDIO_S16SYS: devtype = DevFmtShort; break;
+ case AUDIO_S32SYS: devtype = DevFmtInt; break;
+ case AUDIO_F32SYS: devtype = DevFmtFloat; break;
default:
SDL_CloseAudioDevice(devid);
throw al::backend_exception{al::backend_error::DeviceError, "Unhandled SDL format: 0x%04x",