I am trying to run a basic example from the QAudioDeviceInfo class help , but Qt does not find the default sound device.
Running this code does not display output:
foreach (const QAudioDeviceInfo &deviceInfo, QAudioDeviceInfo::availableDevices(QAudio::AudioOutput))
qDebug() << "Device name: " << deviceInfo.deviceName();
I am running Qt Creator 2.7.1 with Qt 5.0.2 on Ubuntu 13.10. Qt Multimedia has been installed via apt-get. My pro file has QT += multimedia. My header file includes:
#include <QAudio>
#include <QAudioOutput>
#include <QAudioDeviceInfo>
Any ideas on what I might be doing wrong?
source
share