From 8011ad97b558fae4fb3c5fc44912dd7e99eed4e5 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 26 Dec 2007 23:29:32 -0800 Subject: Don't check explicitly against formats, but rather their byte/channel count --- Alc/alsa.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'Alc/alsa.c') diff --git a/Alc/alsa.c b/Alc/alsa.c index 2a46eff0..a6035d46 100644 --- a/Alc/alsa.c +++ b/Alc/alsa.c @@ -324,16 +324,12 @@ open_alsa: return ALC_FALSE; } - switch(device->Format) + switch(aluBytesFromFormat(device->Format)) { - case AL_FORMAT_MONO8: - case AL_FORMAT_STEREO8: - case AL_FORMAT_QUAD8: + case 1: data->format = SND_PCM_FORMAT_U8; break; - case AL_FORMAT_MONO16: - case AL_FORMAT_STEREO16: - case AL_FORMAT_QUAD16: + case 2: data->format = SND_PCM_FORMAT_S16; break; default: -- cgit v1.2.3