diff options
author | Chris Robinson <[email protected]> | 2010-12-09 23:47:11 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2010-12-09 23:47:11 -0800 |
commit | 5d607f948459c67a94f88cf21e77f3e04ea7e052 (patch) | |
tree | 6e90b04e707466e7699453edee82a33d0486ab72 /Alc/solaris.c | |
parent | 816c38e9e465d90b558127a231413261e3a9b481 (diff) |
Better check format type returned by AUDIO_SETINFO
Diffstat (limited to 'Alc/solaris.c')
-rw-r--r-- | Alc/solaris.c | 11 |
1 files changed, 8 insertions, 3 deletions
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; } |