[Interest] Refreshing Audio Device List

Randy Yates yates at digitalsignallabs.com
Thu May 29 04:56:41 CEST 2014


I'm maintaining a combobox with a list of the audio devices obtained
from QAudioDeviceInfo::availableDevices() and I'd like to refresh the
list with a refresh button. However, re-executing
  audioDeviceList = QAudioDeviceInfo::availableDevices(QAudio::AudioInput); 
within the same running application doesn't update the device list.

If I exit the app and restart, it shows me the new device list. I'm
hot-plugging a USB audio device in and out.

How do I get a refreshed availableDevices()?

Note that I found an almost identical bug reported here:


The reporter said the problem went away when using QApplication instead
of QCoreApplication, but I'm already using QApplication:

#include "cvrgui.h" include "cvrguiwindow.h" include 
#<QApplication>  int main(int argc, char* argv[]) { 
  Q_INIT_RESOURCE(cvrgui); QApplication app(argc, argv); 
  app.setApplicationName("Continuous Voice Recognition GUI"); 
  app.setOrganizationName("Digital Signal Labs"); 
  CvrGuiWindow cvrGui; cvrGui.show(); 
  return app.exec(); 
Any help would be appreciated.
Randy Yates
Digital Signal Labs

More information about the Interest mailing list