Skip to content
Snippets Groups Projects
Commit 57e47bae authored by Lioncash's avatar Lioncash
Browse files

configure_audio: Use QString::fromStdString() for converting audio device names

This ensures that the proper codec will always be used no matter what.
It also avoids relying on ASCII conversions.
parent 226dc914
No related branches found
No related tags found
No related merge requests found
......@@ -84,10 +84,10 @@ void ConfigureAudio::updateAudioDevices(int sink_index) {
ui->audio_device_combo_box->clear();
ui->audio_device_combo_box->addItem(AudioCore::auto_device_name);
std::string sink_id = ui->output_sink_combo_box->itemText(sink_index).toStdString();
std::vector<std::string> device_list = AudioCore::GetSinkDetails(sink_id).list_devices();
const std::string sink_id = ui->output_sink_combo_box->itemText(sink_index).toStdString();
const std::vector<std::string> device_list = AudioCore::GetSinkDetails(sink_id).list_devices();
for (const auto& device : device_list) {
ui->audio_device_combo_box->addItem(device.c_str());
ui->audio_device_combo_box->addItem(QString::fromStdString(device));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment