From 5d607f948459c67a94f88cf21e77f3e04ea7e052 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 9 Dec 2010 23:47:11 -0800 Subject: Better check format type returned by AUDIO_SETINFO --- Alc/solaris.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Alc') diff --git a/Alc/solaris.c b/Alc/solaris.c index b7ca032e..26554d74 100644 --- a/Alc/solaris.c +++ b/Alc/solaris.c @@ -177,10 +177,15 @@ static ALCboolean solaris_reset_playback(ALCdevice *device) return ALC_FALSE; } - if(!((info.play.precision == 8 && device->FmtType == DevFmtUByte) || - (info.play.precision == 16 && device->FmtType == DevFmtShort))) + if(!((info.play.precision == 8 && info.play.encoding == AUDIO_ENCODING_LINEAR && + device->FmtType == DevFmtByte) || + (info.play.precision == 8 && info.play.encoding == AUDIO_ENCODING_LINEAR8 && + device->FmtType == DevFmtUByte) || + (info.play.precision == 16 && info.play.encoding == AUDIO_ENCODING_LINEAR && + device->FmtType == DevFmtShort))) { - AL_PRINT("Could not set %#x sample type, got %d\n", device->FmtType, info.play.precision); + AL_PRINT("Could not set %#x sample type, got %d (%#x)\n", + device->FmtType, info.play.precision, info.play.encoding); return ALC_FALSE; } -- cgit v1.2.3