MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / getInputDevices

Method getInputDevices

app/src/API/Handlers/AudioHandler.cpp:349–365  ·  view source on GitHub ↗

* @brief Get input devices list */

Source from the content-addressed store, hash-verified

347 * @brief Get input devices list
348 */
349API::CommandResponse API::Handlers::AudioHandler::getInputDevices(const QString& id,
350 const QJsonObject& params)
351{
352 Q_UNUSED(params)
353
354 const auto& devices = IO::ConnectionManager::instance().audio()->inputDeviceList();
355
356 QJsonArray devices_array;
357 for (const auto& device : devices)
358 devices_array.append(device);
359
360 QJsonObject result;
361 result[QStringLiteral("devices")] = devices_array;
362 result[QStringLiteral("selectedIndex")] =
363 IO::ConnectionManager::instance().audio()->selectedInputDevice();
364 return CommandResponse::makeSuccess(id, result);
365}
366
367/**
368 * @brief Get output devices list

Callers

nothing calls this directly

Calls 4

inputDeviceListMethod · 0.80
audioMethod · 0.80
selectedInputDeviceMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected