summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qaudiodeviceinfo.cpp
diff options
context:
space:
mode:
authorKurt Korbatits <kurt.korbatits@nokia.com>2010-01-15 03:38:12 (GMT)
committerKurt Korbatits <kurt.korbatits@nokia.com>2010-01-15 03:38:12 (GMT)
commitf0d24ba1eaa1079abef3a1da641b43437dc7df66 (patch)
tree297d6ae2cd6f39a7b84ff008245e441191c534df /src/multimedia/audio/qaudiodeviceinfo.cpp
parent43d654e4d38b998972fa97ab2c23720db3fef8bb (diff)
downloadQt-f0d24ba1eaa1079abef3a1da641b43437dc7df66.zip
Qt-f0d24ba1eaa1079abef3a1da641b43437dc7df66.tar.gz
Qt-f0d24ba1eaa1079abef3a1da641b43437dc7df66.tar.bz2
Added new funcs to QAudioFormat and QAudioDeviceInfo class's.
QAudioFormat::setChannelCount(), channelCount() QAudioFormat::setSampleRate(), sampleRate() QAudioDeviceInfo::supportedChannelCounts(), supportedSampleRates() Changed all instances to use these new functions instead of channels(),frequency(),setFrequency(),setChannels() supportedChannels(),supportedFrequencies() Old functions still exist but are marked obsolete. Reviewed-by:Justin McPherson
Diffstat (limited to 'src/multimedia/audio/qaudiodeviceinfo.cpp')
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo.cpp32
1 files changed, 29 insertions, 3 deletions
diff --git a/src/multimedia/audio/qaudiodeviceinfo.cpp b/src/multimedia/audio/qaudiodeviceinfo.cpp
index dce2884..45e177e 100644
--- a/src/multimedia/audio/qaudiodeviceinfo.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo.cpp
@@ -100,13 +100,13 @@ public:
You can also query each device for the formats it supports. A
format in this context is a set consisting of a specific byte
- order, channel, codec, frequency, sample rate, and sample type. A
+ order, channel, codec, sample rate, sample size and sample type. A
format is represented by the QAudioFormat class.
The values supported by the the device for each of these
parameters can be fetched with
- supportedByteOrders(), supportedChannels(), supportedCodecs(),
- supportedFrequencies(), supportedSampleSizes(), and
+ supportedByteOrders(), supportedChannelCounts(), supportedCodecs(),
+ supportedSampleRates(), supportedSampleSizes(), and
supportedSampleTypes(). The combinations supported are dependent on the platform,
audio plugins installed and the audio device capabilities. If you need a specific format, you can check if
the device supports it with isFormatSupported(), or fetch a
@@ -259,6 +259,19 @@ QStringList QAudioDeviceInfo::supportedCodecs() const
}
/*!
+ Returns a list of supported sample rates.
+*/
+
+QList<int> QAudioDeviceInfo::supportedSampleRates() const
+{
+ return supportedFrequencies();
+}
+
+/*!
+ \obsolete
+
+ Use supportedSampleRates() instead.
+
Returns a list of supported frequencies.
*/
@@ -268,6 +281,19 @@ QList<int> QAudioDeviceInfo::supportedFrequencies() const
}
/*!
+ Returns a list of supported channel counts.
+*/
+
+QList<int> QAudioDeviceInfo::supportedChannelCounts() const
+{
+ return supportedChannels();
+}
+
+/*!
+ \obsolete
+
+ Use supportedChannelCount() instead.
+
Returns a list of supported channels.
*/