From 4cabca33c64c0f78523ca16124014e64d993f739 Mon Sep 17 00:00:00 2001 From: Nicholas Bennett Date: Tue, 11 Jan 2022 15:34:58 +0200 Subject: Docs: Remove reference to QAudioDevice::nearestFormat When setting a media format property the class will now automatically find the nearest supported property value if value being set is not supported by the QAudioDevice. The is no nearestFormat() to call. Updated the snippet reference to one that is more useful and removed the obsolete reference. Fixes: 99645 Change-Id: If04d78f47e9fda482eb392b95931ca1b0eee9337 Reviewed-by: Lars Knoll (cherry picked from commit 22df11fc74d680014d2a3a876bbd765101922c52) Reviewed-by: Qt Cherry-pick Bot --- src/multimedia/audio/qaudiodevice.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/multimedia/audio/qaudiodevice.cpp b/src/multimedia/audio/qaudiodevice.cpp index bc3e50058..f2265dcf6 100644 --- a/src/multimedia/audio/qaudiodevice.cpp +++ b/src/multimedia/audio/qaudiodevice.cpp @@ -73,10 +73,9 @@ QT_DEFINE_QESDP_SPECIALIZATION_DTOR(QAudioDevicePrivate); minimumSampleRate(), maximumSampleRate() and supportedSampleFormats(). The combinations supported are dependent on the audio device capabilities. If you need a specific format, 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(). For instance: + isFormatSupported(). For instance: - \snippet multimedia-snippets/audio.cpp Setting audio format + \snippet multimedia-snippets/audio.cpp Audio output setup The set of available devices can be retrieved from the QMediaDevices class. @@ -88,7 +87,7 @@ QT_DEFINE_QESDP_SPECIALIZATION_DTOR(QAudioDevicePrivate); sound, i.e., play an audio stream in a supported format. For each device we find, we simply print the deviceName(). - \sa QAudioSink, QAudioSource + \sa QAudioSink, QAudioSource QAudioFormat */ /*! -- cgit v1.2.3