src/multimedia/audio/qaudiodeviceinfo.cpp
branchGCC_SURGE
changeset 31 5daf16870df6
parent 30 5dc02b23752f
child 33 3e2da88830cd
equal deleted inserted replaced
27:93b982ccede2 31:5daf16870df6
   103     order, channel, codec, frequency, sample rate, and sample type.  A
   103     order, channel, codec, frequency, sample rate, and sample type.  A
   104     format is represented by the QAudioFormat class.
   104     format is represented by the QAudioFormat class.
   105 
   105 
   106     The values supported by the the device for each of these
   106     The values supported by the the device for each of these
   107     parameters can be fetched with
   107     parameters can be fetched with
   108     supportedByteOrders(), supportedChannels(), supportedCodecs(),
   108     supportedByteOrders(), supportedChannelCounts(), supportedCodecs(),
   109     supportedFrequencies(), supportedSampleSizes(), and
   109     supportedSampleRates(), supportedSampleSizes(), and
   110     supportedSampleTypes(). The combinations supported are dependent on the platform,
   110     supportedSampleTypes(). The combinations supported are dependent on the platform,
   111     audio plugins installed and the audio device capabilities. If you need a specific format, you can check if
   111     audio plugins installed and the audio device capabilities. If you need a specific format, you can check if
   112     the device supports it with isFormatSupported(), or fetch a
   112     the device supports it with isFormatSupported(), or fetch a
   113     supported format that is as close as possible to the format with
   113     supported format that is as close as possible to the format with
   114     nearestFormat(). For instance:
   114     nearestFormat(). For instance:
   257 {
   257 {
   258     return isNull() ? QStringList() : d->info->codecList();
   258     return isNull() ? QStringList() : d->info->codecList();
   259 }
   259 }
   260 
   260 
   261 /*!
   261 /*!
   262     Returns a list of supported frequencies.
   262     Returns a list of supported sample rates.
       
   263 
       
   264     \since 4.7
       
   265 */
       
   266 
       
   267 QList<int> QAudioDeviceInfo::supportedSampleRates() const
       
   268 {
       
   269     return supportedFrequencies();
       
   270 }
       
   271 
       
   272 /*!
       
   273     \obsolete
       
   274 
       
   275     Use supportedSampleRates() instead.
   263 */
   276 */
   264 
   277 
   265 QList<int> QAudioDeviceInfo::supportedFrequencies() const
   278 QList<int> QAudioDeviceInfo::supportedFrequencies() const
   266 {
   279 {
   267     return isNull() ? QList<int>() : d->info->frequencyList();
   280     return isNull() ? QList<int>() : d->info->frequencyList();
   268 }
   281 }
   269 
   282 
   270 /*!
   283 /*!
   271     Returns a list of supported channels.
   284     Returns a list of supported channel counts.
       
   285 
       
   286     \since 4.7
       
   287 */
       
   288 
       
   289 QList<int> QAudioDeviceInfo::supportedChannelCounts() const
       
   290 {
       
   291     return supportedChannels();
       
   292 }
       
   293 
       
   294 /*!
       
   295     \obsolete
       
   296 
       
   297     Use supportedChannelCount() instead.
   272 */
   298 */
   273 
   299 
   274 QList<int> QAudioDeviceInfo::supportedChannels() const
   300 QList<int> QAudioDeviceInfo::supportedChannels() const
   275 {
   301 {
   276     return isNull() ? QList<int>() : d->info->channelsList();
   302     return isNull() ? QList<int>() : d->info->channelsList();