Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Solved QAudioDeviceInfo cannot find available audio device in RPi ?

    Mobile and Embedded
    2
    3
    675
    Loading More Posts
    • 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
      Hiloshi last edited by

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 1
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          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 Reply Quote 1
          • H
            Hiloshi @SGaist last edited by

            @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 Reply Quote 0
            • First post
              Last post