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

Method setSelectedInputDevice

app/src/IO/Drivers/Audio.cpp:861–877  ·  view source on GitHub ↗

* @brief Sets the selected input device by index. */

Source from the content-addressed store, hash-verified

859 * @brief Sets the selected input device by index.
860 */
861void IO::Drivers::Audio::setSelectedInputDevice(int index)
862{
863 if (isOpen())
864 return;
865
866 if (index < 0 || index >= inputDeviceList().size())
867 index = 0;
868
869 m_selectedInputDevice = index;
870 m_selectedSampleRate = -1;
871 m_selectedInputSampleFormat = -1;
872 m_selectedInputChannelConfiguration = -1;
873
874 syncInputParameters();
875 configureInput();
876 persistSettings();
877}
878
879/**
880 * @brief Sets the selected sample format index for the input device.

Callers 1

setInputDeviceMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected