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

On Windows retrieving the deviceName from QAudioDeviceInfo returns a partial string for the deviceName

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2: Important P2: Important
    • None
    • 5.6.0
    • Multimedia
    • None
    • Windows 7.

      On windows platform the following code will return a partial string for the deviceName of all audioOutput devices.

      QAudioDeviceInfo deviceInfo(QAudioDeviceInfo::defaultOutputDevice());
      auto outputDevices = deviceInfo.availableDevices(QAudio::Mode::AudioOutput);
      for (auto device : outputDevices)

      { device.deviceName() }

      For example in my system I have a Logitec headset.

      • Using native windows apis the deviceName returned is following:
        "speakers (logitech usb headset h540)"
      • Using QAudioDeviceInfo api the deviceName returned is following: "Speakers (Logitech USB Headset"

      Notice the string is partial and the end is cropped, the same behaviour happens for all devices including AudioInput and AudioOutput.

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

            valentyn.doroshchuk Valentyn Doroshchuk
            des Des Healy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes