QAudioDeviceInfo finds no audio device on Ubuntu

  • I am trying to run the basic example from the "QAudioDeviceInfo class reference":, but Qt is not finding an audio device.

    Running this code shows no output:

    @foreach (const QAudioDeviceInfo &deviceInfo, QAudioDeviceInfo::availableDevices(QAudio::AudioOutput))
    qDebug() << "Device name: " << deviceInfo.deviceName();@

    I'm running Qt Creator 2.7.1 with Qt 5.0.2 on Ubuntu 13.10. Qt Multimedia was installed via apt-get. My pro file has QT += multimedia. My header file includes:

    @#include <QAudio>
    #include <QAudioOutput>
    #include <QAudioDeviceInfo>@

    Any ideas as to what I might be doing wrong? Thanks everyone!

  • Finally found the fix:

    @sudo apt-get install libqt5multimedia5-plugins@

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.