src/multimedia/audio/qaudiodeviceinfo.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   119 
   119 
   120     A QAudioDeviceInfo is used by Qt to construct
   120     A QAudioDeviceInfo is used by Qt to construct
   121     classes that communicate with the device--such as
   121     classes that communicate with the device--such as
   122     QAudioInput, and QAudioOutput. The static
   122     QAudioInput, and QAudioOutput. The static
   123     functions defaultInputDevice(), defaultOutputDevice(), and
   123     functions defaultInputDevice(), defaultOutputDevice(), and
   124     deviceList() let you get a list of all available
   124     availableDevices() let you get a list of all available
   125     devices. Devices are fetch according to the value of mode
   125     devices. Devices are fetch according to the value of mode
   126     this is specified by the QAudio::Mode enum.
   126     this is specified by the QAudio::Mode enum.
   127     The QAudioDeviceInfo returned are only valid for the QAudio::Mode.
   127     The QAudioDeviceInfo returned are only valid for the QAudio::Mode.
   128 
   128 
   129     For instance:
   129     For instance:
   130 
   130 
   131     \code
   131     \code
   132     foreach(const QAudioDeviceInfo &deviceInfo, QAudioDeviceInfo::deviceList(QAudio::AudioOutput))
   132     foreach(const QAudioDeviceInfo &deviceInfo, QAudioDeviceInfo::availableDevices(QAudio::AudioOutput))
   133         qDebug() << "Device name: " << deviceInfo.deviceName();
   133         qDebug() << "Device name: " << deviceInfo.deviceName();
   134     \endcode
   134     \endcode
   135 
   135 
   136     In this code sample, we loop through all devices that are able to output
   136     In this code sample, we loop through all devices that are able to output
   137     sound, i.e., play an audio stream in a supported format. For each device we
   137     sound, i.e., play an audio stream in a supported format. For each device we
   325 
   325 
   326 /*!
   326 /*!
   327     Returns a list of audio devices that support \a mode.
   327     Returns a list of audio devices that support \a mode.
   328 */
   328 */
   329 
   329 
   330 QList<QAudioDeviceInfo> QAudioDeviceInfo::deviceList(QAudio::Mode mode)
   330 QList<QAudioDeviceInfo> QAudioDeviceInfo::availableDevices(QAudio::Mode mode)
   331 {
   331 {
   332     return QAudioDeviceFactory::deviceList(mode);
   332     return QAudioDeviceFactory::availableDevices(mode);
   333 }
   333 }
   334 
   334 
   335 
   335 
   336 /*!
   336 /*!
   337     \internal
   337     \internal