From 8a5858a903f9534ec63ab511de715f830aacba1f Mon Sep 17 00:00:00 2001 From: Art Pinch Date: Tue, 24 Nov 2020 18:07:37 +0300 Subject: [PATCH] [SystemVolumePlugin][Windows] Fixed sink callback registration condition --- plugins/systemvolume/systemvolumeplugin-win.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/systemvolume/systemvolumeplugin-win.cpp b/plugins/systemvolume/systemvolumeplugin-win.cpp index 9efb31173..1e4b9002c 100644 --- a/plugins/systemvolume/systemvolumeplugin-win.cpp +++ b/plugins/systemvolume/systemvolumeplugin-win.cpp @@ -312,13 +312,13 @@ bool SystemvolumePlugin::sendSinkList() sinkObject.insert(QStringLiteral("maxVolume"), (qint64)100); // Register Callback - QString qDeviceId = QString::fromWCharArray(deviceId); - if (!sinkList.contains(qDeviceId)) { + if (!sinkList.contains(name)) { callback = new CAudioEndpointVolumeCallback(*this, name); endpoint->RegisterControlChangeNotify(callback); sinkList[name] = qMakePair(endpoint, callback); } + QString qDeviceId = QString::fromWCharArray(deviceId); idToNameMap[qDeviceId] = name; device->Release();