* @brief Get input sample formats list */
| 410 | * @brief Get input sample formats list |
| 411 | */ |
| 412 | API::CommandResponse API::Handlers::AudioHandler::getInputFormats(const QString& id, |
| 413 | const QJsonObject& params) |
| 414 | { |
| 415 | Q_UNUSED(params) |
| 416 | |
| 417 | const auto& formats = IO::ConnectionManager::instance().audio()->inputSampleFormats(); |
| 418 | |
| 419 | QJsonArray formats_array; |
| 420 | for (const auto& format : formats) |
| 421 | formats_array.append(format); |
| 422 | |
| 423 | QJsonObject result; |
| 424 | result[QStringLiteral("formats")] = formats_array; |
| 425 | result[QStringLiteral("selectedIndex")] = |
| 426 | IO::ConnectionManager::instance().audio()->selectedInputSampleFormat(); |
| 427 | return CommandResponse::makeSuccess(id, result); |
| 428 | } |
| 429 | |
| 430 | /** |
| 431 | * @brief Get output sample formats list |
nothing calls this directly
no test coverage detected