From c212c874c754db7f7bceb9038a105816fe771ec3 Mon Sep 17 00:00:00 2001 From: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com> Date: Sun, 30 May 2021 22:48:07 -0400 Subject: [PATCH] calloverlay: fix audio output device selection Gitlab: #411 Change-Id: Ic963e60ce2a41272be0052b5a775c9277f150907 --- src/audiodevicemodel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/audiodevicemodel.cpp b/src/audiodevicemodel.cpp index 9bb6e7d80..a87e2ba05 100644 --- a/src/audiodevicemodel.cpp +++ b/src/audiodevicemodel.cpp @@ -119,7 +119,8 @@ AudioDeviceModel::reset() int AudioDeviceModel::getCurrentIndex() const { - QString currentId = lrcInstance_->avModel().getInputDevice(); + auto currentId = type_ == Type::Record ? lrcInstance_->avModel().getInputDevice() + : lrcInstance_->avModel().getOutputDevice(); auto resultList = match(index(0, 0), Qt::DisplayRole, QVariant(currentId)); return resultList.size() > 0 ? resultList[0].row() : 0; } -- GitLab