aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-03-08 22:09:30 -0800
committerChris Robinson <[email protected]>2018-03-08 22:09:30 -0800
commit41cc82e84beff737afbdf2b56ba8f53d8fb04559 (patch)
tree3af1e20ff388d6deb3320b00c6e66a3c0fa7e47e
parent2866c6cf280dec63336d2733bc300db9d7bbcce6 (diff)
Print the unsupported values from SDL2
-rw-r--r--Alc/backends/sdl2.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/Alc/backends/sdl2.c b/Alc/backends/sdl2.c
index 27f42129..61076789 100644
--- a/Alc/backends/sdl2.c
+++ b/Alc/backends/sdl2.c
@@ -110,10 +110,7 @@ static ALCenum ALCsdl2Backend_open(ALCsdl2Backend *self, const ALCchar *name)
// device in the list.
self->deviceID = SDL_OpenAudioDevice(name, 0, &want, &have, SDL_AUDIO_ALLOW_ANY_CHANGE);
if(self->deviceID == 0)
- {
- ERR("Could not open device\n");
return ALC_INVALID_VALUE;
- }
device->Frequency = have.freq;
if(have.channels == 1)
@@ -122,7 +119,7 @@ static ALCenum ALCsdl2Backend_open(ALCsdl2Backend *self, const ALCchar *name)
device->FmtChans = DevFmtStereo;
else
{
- ERR("Invalid number of channels\n");
+ ERR("Got unhandled SDL channel count: %d\n", (int)have.channels);
return ALC_INVALID_VALUE;
}
switch(have.format)
@@ -134,7 +131,7 @@ static ALCenum ALCsdl2Backend_open(ALCsdl2Backend *self, const ALCchar *name)
case AUDIO_S32SYS: device->FmtType = DevFmtInt; break;
case AUDIO_F32SYS: device->FmtType = DevFmtFloat; break;
default:
- ERR("Unsupported format\n");
+ ERR("Got unsupported SDL format: 0x%04x\n", have.format);
return ALC_INVALID_VALUE;
}
device->UpdateSize = have.samples;