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 availableDevices

QAudioDeviceInfo availableDevices

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.5k 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
    mcallegari79
    wrote on last edited by
    #1

    Hi all,
    I am using Qt 5.2.1 on Linux. If I call
    @QAudioDeviceInfo::availableDevices(...)@
    I get a list of devices like this:
    @alsa_output.pci-0000_00_1b.0.analog-stereo
    alsa_input.pci-0000_00_1b.0.analog-stereo
    alsa_output.pci-0000_00_1b.0.analog-stereo.monitor@

    Now, as far as I understand, availableDevices is the only API that can be called to retrieve the audio devices list that can be presented to the application UI. How can strings like those be of any use to the user ?

    In my previous implementation based on Qt 4.8, I was using direct calls to ALSA, getting a list like this:

    @HDA Intel PCH - ALC269VB Analog
    HDA Intel PCH - HDMI 0@

    So there is indeed a way to get better strings, without the need of additional parsing. Moreover, the code has to be distinguished by platform, as on Windows (for example) the names are a little bit better, but truncated to 31 characters for historical reasons (which I am surprised have never been faced in a serious way)

    My point is, I can use the old ALSA code, but why ?
    First of all I would loose the Qt's cross platform promise.
    Secondly, QtMultimedia should provide all the necessary APIs to control either low level layers but also should give the necessary information to be presented at the UI level.

    Anyone has found any workaround for this ?

    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