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. Distinguish ALSA and Pulseaudio devices with QAudioDeviceInfo
Forum Update on Monday, May 27th 2025

Distinguish ALSA and Pulseaudio devices with QAudioDeviceInfo

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 533 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.
  • T Offline
    T Offline
    tbe.loki
    wrote on last edited by
    #1

    I'm porting an older Qt4 Application, i have written a few years ago to Qt5. As phonon was dropped, i want to use QtMultimedia.

    I have two notification/alert sounds that should be played on a user definde audio device.

    QAudioDeviceInfo::availableDevices(QAudio::AudioOutput) gives me a full list of all found devices

    "sysdefault:CARD=SB"
    "pulse"
    "front:CARD=SB,DEV=0"
    "surround21:CARD=SB,DEV=0"
    "surround40:CARD=SB,DEV=0"
    "surround41:CARD=SB,DEV=0"
    "surround50:CARD=SB,DEV=0"
    "surround51:CARD=SB,DEV=0"
    "surround71:CARD=SB,DEV=0"
    "iec958:CARD=SB,DEV=0"
    "hdmi:CARD=NVidia,DEV=0"
    "hdmi:CARD=NVidia,DEV=1"
    "hdmi:CARD=NVidia,DEV=2"
    "default"
    "alsa_output.pci-0000_00_14.2.analog-surround-51"
    "alsa_output.pci-0000_01_00.1.hdmi-stereo"
    

    A common user does not know which device is ALSA and wich is Pulseaudio, and will get really confused about the choices for audio output.

    Is there any way to

    • disable ALSA or Pulseaudio from the code
      or
    • check if a device is alsa or pulseaudio
    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