mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
[AFV] Ref T730 check function for same devices
This commit is contained in:
@@ -139,6 +139,16 @@ namespace BlackMisc
|
||||
return names;
|
||||
}
|
||||
|
||||
bool CAudioDeviceInfoList::hasSameDevices(const CAudioDeviceInfoList &compareDevices) const
|
||||
{
|
||||
if (compareDevices.size() != this->size()) { return false; }
|
||||
for (const CAudioDeviceInfo &d : *this)
|
||||
{
|
||||
if (!compareDevices.findRegisteredDevice(d).isValid()) { return false; }
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
CAudioDeviceInfoList CAudioDeviceInfoList::allInputDevices()
|
||||
{
|
||||
CAudioDeviceInfoList devices;
|
||||
|
||||
@@ -79,6 +79,9 @@ namespace BlackMisc
|
||||
//! All names
|
||||
QStringList getDeviceNames() const;
|
||||
|
||||
//! Has same devices
|
||||
bool hasSameDevices(const CAudioDeviceInfoList &compareDevices) const;
|
||||
|
||||
//! Lists of all available devices @{
|
||||
static CAudioDeviceInfoList allInputDevices();
|
||||
static CAudioDeviceInfoList allOutputDevices();
|
||||
|
||||
Reference in New Issue
Block a user