[AFV] Ref T730, check for same device

This commit is contained in:
Klaus Basan
2019-10-13 00:14:52 +02:00
parent 10a64c0330
commit 541ce76fb6
5 changed files with 31 additions and 8 deletions

View File

@@ -7,6 +7,7 @@
*/
#include "blackmisc/audio/audiodeviceinfo.h"
#include "blackmisc/stringutils.h"
#include <QStringBuilder>
#include <QHostInfo>
@@ -26,6 +27,13 @@ namespace BlackMisc
m_deviceName(name), m_hostName(QHostInfo::localHostName())
{ }
bool CAudioDeviceInfo::matchesNameTypeHostName(const CAudioDeviceInfo &device) const
{
return device.getType() == this->getType() &&
stringCompare(device.getName(), this->getName(), Qt::CaseInsensitive) &&
stringCompare(device.getHostName(), this->getHostName(), Qt::CaseInsensitive);
}
CAudioDeviceInfo::DeviceType CAudioDeviceInfo::fromQtMode(QAudio::Mode m)
{
switch (m)