Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QAudioDeviceInfo finds no audio device on Ubuntu

QAudioDeviceInfo finds no audio device on Ubuntu

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    maxmcmahon
    wrote on last edited by
    #1

    I am trying to run the basic example from the "QAudioDeviceInfo class reference":http://qt-project.org/doc/qt-5.0/qtmultimedia/qaudiodeviceinfo.html, 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!

    1 Reply Last reply
    0
    • M Offline
      M Offline
      maxmcmahon
      wrote on last edited by
      #2

      Finally found the fix:

      @sudo apt-get install libqt5multimedia5-plugins@

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved