[SystemVolumePlugin][Windows] Fixed sink callback registration condition

This commit is contained in:
Art Pinch 2020-11-24 18:07:37 +03:00 committed by Piyush Aggarwal
parent b5ac96ce5b
commit 8a5858a903

View file

@ -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();