diff options
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) |