[SystemVolumePlugin][Windows] Fixed sink callback registration condition
This commit is contained in:
parent
b5ac96ce5b
commit
8a5858a903
1 changed files with 2 additions and 2 deletions
|
@ -312,13 +312,13 @@ bool SystemvolumePlugin::sendSinkList()
|
||||||
sinkObject.insert(QStringLiteral("maxVolume"), (qint64)100);
|
sinkObject.insert(QStringLiteral("maxVolume"), (qint64)100);
|
||||||
|
|
||||||
// Register Callback
|
// Register Callback
|
||||||
QString qDeviceId = QString::fromWCharArray(deviceId);
|
if (!sinkList.contains(name)) {
|
||||||
if (!sinkList.contains(qDeviceId)) {
|
|
||||||
callback = new CAudioEndpointVolumeCallback(*this, name);
|
callback = new CAudioEndpointVolumeCallback(*this, name);
|
||||||
endpoint->RegisterControlChangeNotify(callback);
|
endpoint->RegisterControlChangeNotify(callback);
|
||||||
sinkList[name] = qMakePair(endpoint, callback);
|
sinkList[name] = qMakePair(endpoint, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString qDeviceId = QString::fromWCharArray(deviceId);
|
||||||
idToNameMap[qDeviceId] = name;
|
idToNameMap[qDeviceId] = name;
|
||||||
|
|
||||||
device->Release();
|
device->Release();
|
||||||
|
|
Loading…
Reference in a new issue