diff options
author | Chris Robinson <[email protected]> | 2022-02-15 17:30:07 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-02-15 17:30:07 -0800 |
commit | ff54ed0fced021c5c1cd5e96e7c798d6129147ad (patch) | |
tree | 2bcb7e4692cae76b1037d20ec6306e23e7c7d383 /alc/backends | |
parent | 0493085ea2fabbf7431911143dcfbb7482a27c43 (diff) |
Reset mIs51Rear only when updating the channel config
Diffstat (limited to 'alc/backends')
-rw-r--r-- | alc/backends/pipewire.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/alc/backends/pipewire.cpp b/alc/backends/pipewire.cpp index e448ee6f..71fdf768 100644 --- a/alc/backends/pipewire.cpp +++ b/alc/backends/pipewire.cpp @@ -696,11 +696,11 @@ void DeviceNode::parseSampleRate(const spa_pod *value) noexcept void DeviceNode::parsePositions(const spa_pod *value) noexcept { - mIs51Rear = false; - const auto chanmap = get_array_span<SPA_TYPE_Id>(value); if(chanmap.empty()) return; + mIs51Rear = false; + if(MatchChannelMap(chanmap, X71Map)) mChannels = DevFmtX71; else if(MatchChannelMap(chanmap, X61Map)) @@ -724,12 +724,12 @@ void DeviceNode::parsePositions(const spa_pod *value) noexcept void DeviceNode::parseChannelCount(const spa_pod *value) noexcept { - mIs51Rear = false; - /* As a fallback with just a channel count, just assume mono or stereo. */ const auto chancount = get_value<SPA_TYPE_Int>(value); if(!chancount) return; + mIs51Rear = false; + if(*chancount >= 2) mChannels = DevFmtStereo; else if(*chancount >= 1) |