From d18cc75e289eac7033e58967c22bd65778e08301 Mon Sep 17 00:00:00 2001
From: atraczyk <andreastraczyk@gmail.com>
Date: Mon, 20 Feb 2017 12:32:55 -0500
Subject: [PATCH] audio: fix undo of commit
 149e8e5c526cee0d8ed2351409f7e78807541475

- commit 71882bc49df7cd6f54f498482e69cff51a152ff8 accidentally
  undid commit 149e8e5c526cee0d8ed2351409f7e78807541475

Change-Id: Ie1165a4d856be3b2b07d7724e2c8284b1c92aca0
---
 src/media/audio/portaudio/portaudiolayer.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/media/audio/portaudio/portaudiolayer.cpp b/src/media/audio/portaudio/portaudiolayer.cpp
index 43a0e49513..72541e308f 100644
--- a/src/media/audio/portaudio/portaudiolayer.cpp
+++ b/src/media/audio/portaudio/portaudiolayer.cpp
@@ -386,8 +386,13 @@ PortAudioLayer::PortAudioLayerImpl::init(PortAudioLayer& parent)
         terminate();
     }
 
-    indexRing_ = indexOut_ = indexOut_ == paNoDevice ? Pa_GetDefaultOutputDevice() : indexOut_;
-    indexIn_ = indexIn_ == paNoDevice ? Pa_GetDefaultInputDevice() : indexIn_;
+#ifdef RING_UWP
+    indexRing_ = indexOut_ = Pa_GetDefaultOutputDevice();
+    indexIn_ = Pa_GetDefaultInputDevice();
+#else
+    indexRing_ = indexOut_ = indexOut_ == paNoDevice ? Pa_GetDefaultOutputDevice() : indexOut_;
+    indexIn_ = indexIn_ == paNoDevice ? Pa_GetDefaultInputDevice() : indexIn_;
+#endif
 
     if (indexOut_ != paNoDevice) {
         if (const auto outputDeviceInfo = Pa_GetDeviceInfo(indexOut_)) {
-- 
GitLab