Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QAudioDeviceInfo cannot find available audio device in RPi ?
Forum Updated to NodeBB v4.3 + New Features

QAudioDeviceInfo cannot find available audio device in RPi ?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
3 Posts 2 Posters 850 Views 1 Watching
  • 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.
  • H Offline
    H Offline
    Hiloshi
    wrote on last edited by
    #1

    Dear Sirs,

    I tried below code on RPi3:

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

    In WIN7, it shows correct audio device, such as "Realtek HD Audio".

    However, in RPi3, it cannot find ant audio device. I can play music to 3.5mm Headphone jack by CLI:

    aplay -D hw:0,0 123.wav
    

    So I believe audio device is working, I don't know why above QT demo code not working.

    Another clue is: I use "./configure xxxxxxxxx --recheck" it shows

    ALSA ................................... no
    

    Do I have to see it "YES" then can work ?

    Is there anyone can help ?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      That would help yes. For that you need to have the ALSA development package on your Pi for when you build Qt.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      H 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        That would help yes. For that you need to have the ALSA development package on your Pi for when you build Qt.

        H Offline
        H Offline
        Hiloshi
        wrote on last edited by
        #3

        @SGaist ,

        After install alsa-dev package and re-run ./configure, then I can see ALSA is YES.
        And thus QAudioDeviceInfo can see audio sound card.

        Thanks.

        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