diff options
author | Chris Robinson <[email protected]> | 2020-12-17 21:07:53 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-12-17 21:07:53 -0800 |
commit | 5edd5a11fc16147ee25566db75732533005d1f46 (patch) | |
tree | 7f6e89f7c7afcb150a57b40f8aa5c25baf26c43e /alc/backends/sdl2.cpp | |
parent | 7d2e21334c5bc6423abed3b450d369829d7c1fde (diff) |
Don't use ALC error enums for the backend error code
Diffstat (limited to 'alc/backends/sdl2.cpp')
-rw-r--r-- | alc/backends/sdl2.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/alc/backends/sdl2.cpp b/alc/backends/sdl2.cpp index 05e8e4e0..7563689b 100644 --- a/alc/backends/sdl2.cpp +++ b/alc/backends/sdl2.cpp @@ -123,7 +123,7 @@ void Sdl2Backend::open(const ALCchar *name) SDL_AUDIO_ALLOW_ANY_CHANGE); } if(mDeviceID == 0) - throw al::backend_exception{ALC_INVALID_VALUE, "%s", SDL_GetError()}; + throw al::backend_exception{al::backend_error::NoDevice, "%s", SDL_GetError()}; mDevice->Frequency = static_cast<ALuint>(have.freq); @@ -132,8 +132,8 @@ void Sdl2Backend::open(const ALCchar *name) else if(have.channels == 2) mDevice->FmtChans = DevFmtStereo; else - throw al::backend_exception{ALC_INVALID_VALUE, "Unhandled SDL channel count: %d", - int{have.channels}}; + throw al::backend_exception{al::backend_error::DeviceError, + "Unhandled SDL channel count: %d", int{have.channels}}; switch(have.format) { @@ -144,7 +144,7 @@ void Sdl2Backend::open(const ALCchar *name) case AUDIO_S32SYS: mDevice->FmtType = DevFmtInt; break; case AUDIO_F32SYS: mDevice->FmtType = DevFmtFloat; break; default: - throw al::backend_exception{ALC_INVALID_VALUE, "Unhandled SDL format: 0x%04x", + throw al::backend_exception{al::backend_error::DeviceError, "Unhandled SDL format: 0x%04x", have.format}; } mDevice->UpdateSize = have.samples; |