| 191 | } |
| 192 | |
| 193 | static size_t getDeviceIndex(const std::string_view& deviceName) |
| 194 | { |
| 195 | if (deviceName.empty()) |
| 196 | { |
| 197 | return 0; |
| 198 | } |
| 199 | |
| 200 | if (_devices.empty()) |
| 201 | { |
| 202 | getDevices(); |
| 203 | } |
| 204 | |
| 205 | auto fr = std::find(_devices.begin(), _devices.end(), deviceName); |
| 206 | if (fr != _devices.end()) |
| 207 | { |
| 208 | return fr - _devices.begin(); |
| 209 | } |
| 210 | return std::numeric_limits<size_t>().max(); |
| 211 | } |
| 212 | |
| 213 | void initialiseDSound() |
| 214 | { |
no test coverage detected