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

Documentation refers to nonexistent QAudioDevice::nearestFormat method

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.3.0
    • 6.3.0 Feature Freeze
    • Documentation, Multimedia
    • None

    Description

      The multimedia-class doc is critical as developers port from Qt 5 to 6.

      One missing function is referred to in a couple of places, such as here. You'll find this statement:

      you can check if the device supports it with isFormatSupported(), or fetch a supported format that is as close as possible to the format with nearestFormat()

      The nearestFormat() function no longer exists.

      Another reference is here. The comment in the code says it will try to find the nearest format, but the line that used to attempt to do so (by calling the above-mentioned, now-nonexistent function) has been deleted. So this entire piece of code is useless:

      QAudioDevice info = QMediaDevices::defaultAudioInput();
      if (!info.isFormatSupported(format))

      {     qWarning() << "Default format not supported, trying to use the nearest."; }

      Attachments

        Issue Links

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

          Activity

            People

              nick_bennett Nicholas Bennett
              stoked Gavin Stokes
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes