Mercurial > hg > sonic-visualiser
comparison main/PreferencesDialog.cpp @ 1417:8bff263578ae 3.0-integration
Minor tidy
author | Chris Cannam |
---|---|
date | Mon, 12 Dec 2016 17:07:09 +0000 |
parents | 13eb1d55f129 |
children | 4618d3a03069 |
comparison
equal
deleted
inserted
replaced
1416:130d167401b0 | 1417:8bff263578ae |
---|---|
584 string implementationName; | 584 string implementationName; |
585 if (in_range_for(names, m_audioImplementation-1)) { | 585 if (in_range_for(names, m_audioImplementation-1)) { |
586 implementationName = names[m_audioImplementation-1]; | 586 implementationName = names[m_audioImplementation-1]; |
587 } | 587 } |
588 | 588 |
589 m_audioPlaybackDeviceCombo->clear(); | |
590 m_audioRecordDeviceCombo->clear(); | |
591 | |
592 QString suffix; | 589 QString suffix; |
593 if (implementationName != "") { | 590 if (implementationName != "") { |
594 suffix = "-" + QString(implementationName.c_str()); | 591 suffix = "-" + QString(implementationName.c_str()); |
595 } | 592 } |
596 | 593 |
597 names = breakfastquay::AudioFactory::getPlaybackDeviceNames(implementationName); | 594 names = breakfastquay::AudioFactory::getPlaybackDeviceNames(implementationName); |
598 QString playbackDeviceName = settings.value | 595 QString playbackDeviceName = settings.value |
599 ("audio-playback-device" + suffix, "").toString(); | 596 ("audio-playback-device" + suffix, "").toString(); |
597 m_audioPlaybackDeviceCombo->clear(); | |
600 m_audioPlaybackDeviceCombo->addItem(tr("(auto)")); | 598 m_audioPlaybackDeviceCombo->addItem(tr("(auto)")); |
601 m_audioPlaybackDeviceCombo->setCurrentIndex(0); | 599 m_audioPlaybackDeviceCombo->setCurrentIndex(0); |
602 m_audioPlaybackDevice = 0; | 600 m_audioPlaybackDevice = 0; |
603 for (int i = 0; in_range_for(names, i); ++i) { | 601 for (int i = 0; in_range_for(names, i); ++i) { |
604 m_audioPlaybackDeviceCombo->addItem(names[i].c_str()); | 602 m_audioPlaybackDeviceCombo->addItem(names[i].c_str()); |
609 } | 607 } |
610 | 608 |
611 names = breakfastquay::AudioFactory::getRecordDeviceNames(implementationName); | 609 names = breakfastquay::AudioFactory::getRecordDeviceNames(implementationName); |
612 QString recordDeviceName = settings.value | 610 QString recordDeviceName = settings.value |
613 ("audio-record-device" + suffix, "").toString(); | 611 ("audio-record-device" + suffix, "").toString(); |
612 m_audioRecordDeviceCombo->clear(); | |
614 m_audioRecordDeviceCombo->addItem(tr("(auto)")); | 613 m_audioRecordDeviceCombo->addItem(tr("(auto)")); |
615 m_audioRecordDeviceCombo->setCurrentIndex(0); | 614 m_audioRecordDeviceCombo->setCurrentIndex(0); |
616 m_audioRecordDevice = 0; | 615 m_audioRecordDevice = 0; |
617 for (int i = 0; in_range_for(names, i); ++i) { | 616 for (int i = 0; in_range_for(names, i); ++i) { |
618 m_audioRecordDeviceCombo->addItem(names[i].c_str()); | 617 m_audioRecordDeviceCombo->addItem(names[i].c_str()); |