* @brief Sets the selected output device by index. */
| 916 | * @brief Sets the selected output device by index. |
| 917 | */ |
| 918 | void IO::Drivers::Audio::setSelectedOutputDevice(int index) |
| 919 | { |
| 920 | if (isOpen()) |
| 921 | return; |
| 922 | |
| 923 | if (index < 0 || index >= outputDeviceList().size()) |
| 924 | index = 0; |
| 925 | |
| 926 | m_selectedOutputDevice = index; |
| 927 | m_selectedOutputSampleFormat = -1; |
| 928 | m_selectedOutputChannelConfiguration = -1; |
| 929 | |
| 930 | syncOutputParameters(); |
| 931 | configureOutput(); |
| 932 | persistSettings(); |
| 933 | } |
| 934 | |
| 935 | /** |
| 936 | * @brief Sets the selected sample format for the output device. |