Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-52699

The audio device names are truncated

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P1: Critical
    • None
    • 5.6.0
    • Multimedia
    • None
    • Windows 7 64bit Enterprise

    Description

      This code:

      foreach (const QAudioDeviceInfo &deviceInfo, QAudioDeviceInfo::availableDevices(QAudio::AudioOutput))

      { qDebug() << "Device name: " << deviceInfo.deviceName() << endl; }

      Prints this:

      Device name: "Speakers (Realtek High Definiti"
      Device name: "Acer P241W (2- High Definition "
      Device name: "Realtek Digital Output (Realtek"

      The device names are truncated at 32 characters due to a limitation in Win32 API's waveInGetDevCaps() and waveOutGetDevCaps(). Those use WAVEINCAPS structure where TCHAR szPname[MAXPNAMELEN] houses 32 characters tops.
      That makes it impossible to distinguish between two similar adapters installed.
      Enumeration should be performed by calling DirectSoundEnumerate instead which has no such limitation: https://msdn.microsoft.com/en-us/library/windows/desktop/ee417545%28v=vs.85%29.aspx

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              valentyn.doroshchuk Valentyn Doroshchuk
              nulluse null use
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes