| 298 | } |
| 299 | |
| 300 | void setDevice(size_t index) |
| 301 | { |
| 302 | if (index < _devices.size()) |
| 303 | { |
| 304 | auto& cfg = Config::get(); |
| 305 | #ifdef __HAS_DEFAULT_DEVICE__ |
| 306 | if (index == 0) |
| 307 | { |
| 308 | cfg.audio.device = {}; |
| 309 | } |
| 310 | else |
| 311 | #endif |
| 312 | { |
| 313 | cfg.audio.device = _devices[index]; |
| 314 | } |
| 315 | Config::write(); |
| 316 | reinitialise(); |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | void toggleSound() |
| 321 | { |
no test coverage detected