Commit 149e8e5c authored by atraczyk's avatar atraczyk Committed by gerrit2

audio: ignore results of ALSA's checkSounCard

- Portaudio device indices are initialized to preferences from
  ALSA, which is not natively available on Windows. The default
  values for alsaCardin_, alsaCardOut_, and alsaCardring_ are 0,
  unless they are overwritten by checkSoundCard which will not be
  called on native Windows builds. This patch ignores any
  preferences stored in the daemon's config file, which would all
  be zeros, causing the default audio output to function most
  likely, but not the input.

Change-Id: I7516278a56354f48640c9404c9f96df563838b1c
Tuleap: #790
parent ee5804b0
......@@ -348,8 +348,13 @@ PortAudioLayer::init()
this->terminate();
}
#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_)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment