Skip to content
Snippets Groups Projects
Commit 149e8e5c authored by Andreas Traczyk's avatar Andreas Traczyk Committed by gerrit2
Browse files

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
Branches
No related tags found
No related merge requests found
......@@ -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_)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment