* @brief Sets the selected input device by index. */
| 859 | * @brief Sets the selected input device by index. |
| 860 | */ |
| 861 | void 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. |