* @brief Get output sample formats list */
| 431 | * @brief Get output sample formats list |
| 432 | */ |
| 433 | API::CommandResponse API::Handlers::AudioHandler::getOutputFormats(const QString& id, |
| 434 | const QJsonObject& params) |
| 435 | { |
| 436 | Q_UNUSED(params) |
| 437 | |
| 438 | const auto& formats = IO::ConnectionManager::instance().audio()->outputSampleFormats(); |
| 439 | |
| 440 | QJsonArray formats_array; |
| 441 | for (const auto& format : formats) |
| 442 | formats_array.append(format); |
| 443 | |
| 444 | QJsonObject result; |
| 445 | result[QStringLiteral("formats")] = formats_array; |
| 446 | result[QStringLiteral("selectedIndex")] = |
| 447 | IO::ConnectionManager::instance().audio()->selectedOutputSampleFormat(); |
| 448 | return CommandResponse::makeSuccess(id, result); |
| 449 | } |
| 450 | |
| 451 | /** |
| 452 | * @brief Get complete audio configuration |
nothing calls this directly
no test coverage detected