diff options
author | Chris Robinson <[email protected]> | 2021-01-29 07:37:13 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2021-01-29 07:37:13 -0800 |
commit | 0cd5c37c20bdb4986daa1c3830ab3a30bd1bbe6d (patch) | |
tree | ebbf4d5675a90c469cdf96f903e2b5d59e3c4bb4 /alc/backends/solaris.cpp | |
parent | a2452d82228cc1458bccc64cdab8c9d028121f94 (diff) |
Allow the sample type to get changed on Solaris
Diffstat (limited to 'alc/backends/solaris.cpp')
-rw-r--r-- | alc/backends/solaris.cpp | 16 |
1 files 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; } |