From 0cd5c37c20bdb4986daa1c3830ab3a30bd1bbe6d Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 29 Jan 2021 07:37:13 -0800 Subject: Allow the sample type to get changed on Solaris --- alc/backends/solaris.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/alc/backends/solaris.cpp b/alc/backends/solaris.cpp index 7f2549ce..a5bb45b0 100644 --- a/alc/backends/solaris.cpp +++ b/alc/backends/solaris.cpp @@ -206,13 +206,17 @@ bool SolarisBackend::reset() return false; } - if(!((info.play.precision == 8 && info.play.encoding == AUDIO_ENCODING_LINEAR8 && mDevice->FmtType == DevFmtUByte) || - (info.play.precision == 8 && info.play.encoding == AUDIO_ENCODING_LINEAR && mDevice->FmtType == DevFmtByte) || - (info.play.precision == 16 && info.play.encoding == AUDIO_ENCODING_LINEAR && mDevice->FmtType == DevFmtShort) || - (info.play.precision == 32 && info.play.encoding == AUDIO_ENCODING_LINEAR && mDevice->FmtType == DevFmtInt))) + if(info.play.precision == 8 && info.play.encoding == AUDIO_ENCODING_LINEAR8) + mDevice->FmtType = DevFmtUByte; + else if(info.play.precision == 8 && info.play.encoding == AUDIO_ENCODING_LINEAR) + mDevice->FmtType = DevFmtByte; + else if(info.play.precision == 16 && info.play.encoding == AUDIO_ENCODING_LINEAR) + mDevice->FmtType = DevFmtShort; + else if(info.play.precision == 32 && info.play.encoding == AUDIO_ENCODING_LINEAR) + mDevice->FmtType = DevFmtInt; + else { - ERR("Could not set %s samples, got %d (0x%x)\n", DevFmtTypeString(mDevice->FmtType), - info.play.precision, info.play.encoding); + ERR("Got unhandled sample type: %d (0x%x)\n", info.play.precision, info.play.encoding); return false; } -- cgit v1.2.3