* @brief Returns the index of the device with the given ID, or -1 if absent. */
| 125 | * @brief Returns the index of the device with the given ID, or -1 if absent. |
| 126 | */ |
| 127 | static int deviceIndexById(const QVector<ma_device_info>& list, const ma_device_id& id) |
| 128 | { |
| 129 | for (int i = 0; i < list.size(); ++i) |
| 130 | if (memcmp(&list[i].id, &id, sizeof(ma_device_id)) == 0) |
| 131 | return i; |
| 132 | |
| 133 | return -1; |
| 134 | } |
| 135 | |
| 136 | /** |
| 137 | * @brief Replaces the device list and capabilities, remapping the selected index by device ID |
no test coverage detected