| 273 | } |
| 274 | |
| 275 | const char* getCurrentDeviceName() |
| 276 | { |
| 277 | auto index = getCurrentDevice(); |
| 278 | if (index == 0) |
| 279 | { |
| 280 | #ifdef __HAS_DEFAULT_DEVICE__ |
| 281 | return getDefaultDeviceName(); |
| 282 | #else |
| 283 | if (!_devices.empty()) |
| 284 | { |
| 285 | return _devices[0].c_str(); |
| 286 | } |
| 287 | #endif |
| 288 | } |
| 289 | |
| 290 | const auto& cfg = Config::get(); |
| 291 | return cfg.audio.device.c_str(); |
| 292 | } |
| 293 | |
| 294 | size_t getCurrentDevice() |
| 295 | { |
no test coverage detected