MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / deviceListsDiffer

Function deviceListsDiffer

app/src/IO/Drivers/Audio.cpp:46–60  ·  view source on GitHub ↗

* @brief Compares two device lists to determine if they differ. */

Source from the content-addressed store, hash-verified

44 * @brief Compares two device lists to determine if they differ.
45 */
46static bool deviceListsDiffer(const QVector<ma_device_info>& a, const QVector<ma_device_info>& b)
47{
48 if (a.size() != b.size())
49 return true;
50
51 for (int i = 0; i < a.size(); ++i) {
52 if (memcmp(&a[i].id, &b[i].id, sizeof(ma_device_id)) != 0)
53 return true;
54
55 if (strcmp(a[i].name, b[i].name) != 0)
56 return true;
57 }
58
59 return false;
60}
61
62/**
63 * @brief Extracts audio device capabilities using MiniAudio's backend context.

Callers 1

checkAndUpdateDeviceListFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected