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. [Solved] - How can I tell Qt5 to use Alsa instead of PulseAudio?
QtWS25 Last Chance

[Solved] - How can I tell Qt5 to use Alsa instead of PulseAudio?

Scheduled Pinned Locked Moved Unsolved General and Desktop
soundalsapulse audio
2 Posts 2 Posters 1.0k 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.
  • R Offline
    R Offline
    RedMarsBlueMoon
    wrote on last edited by RedMarsBlueMoon
    #1

    Hi!

    I have a situation where Qt5 keeps trying to use PulseAudio when we want it to try to use Alsa first.
    Alsa is supported in the Qt build but Qt keeps trying to use Pulse and then not playing any sound when that doesn't work.

    We found that we can remove libqtmedia_pulse.so and then it will work and play sound but that's not a good solution.

    We also don't want to exclude Pulse from the Qt build as some people might be using it.

    How should we convince Qt to use Alsa instead?

    UPDATE: I solved this by iterating though the available devices and looking for the one I knew should work.
    I'm thinking we could add a popup menu with some of the available devices and the user can change to PulseAudio if they want.

    Cheers
    Fred

    1 Reply Last reply
    1
    • P Offline
      P Offline
      Puya
      wrote on last edited by
      #2

      @RedMarsBlueMoon How do you iterate through the available devices? Could you give a code snippet? We use QtQuick and use the Audio component to play audio. So nowhere in the code do we get a list of audio devices or iterate through them.

      1 Reply Last reply
      1

      • Login

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