summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qaudioformat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia/audio/qaudioformat.cpp')
-rw-r--r--src/multimedia/audio/qaudioformat.cpp52
1 files changed, 44 insertions, 8 deletions
diff --git a/src/multimedia/audio/qaudioformat.cpp b/src/multimedia/audio/qaudioformat.cpp
index 649cb43..58bb571 100644
--- a/src/multimedia/audio/qaudioformat.cpp
+++ b/src/multimedia/audio/qaudioformat.cpp
@@ -120,7 +120,7 @@ public:
\row
\o Sample size
\o How much data is stored in each sample (typically 8
- or 16)
+ or 16 bits)
\row
\o Sample type
\o Numerical representation of sample (typically signed integer,
@@ -144,7 +144,7 @@ public:
Values are initialized as follows:
\list
\o frequency() = -1
- \o channels() = -1
+ \o channelCount() = -1
\o sampleSize() = -1
\o byteOrder() = QAudioFormat::Endian(QSysInfo::ByteOrder)
\o sampleType() = QAudioFormat::Unknown
@@ -224,7 +224,16 @@ bool QAudioFormat::isValid() const
}
/*!
- Sets the frequency to \a frequency.
+ Sets the sample rate to \a samplerate Hertz.
+*/
+
+void QAudioFormat::setSampleRate(int samplerate)
+{
+ d->frequency = samplerate;
+}
+
+/*!
+ \internal
*/
void QAudioFormat::setFrequency(int frequency)
@@ -233,7 +242,16 @@ void QAudioFormat::setFrequency(int frequency)
}
/*!
- Returns the current frequency value.
+ Returns the current sample rate in Hertz.
+*/
+
+int QAudioFormat::sampleRate() const
+{
+ return d->frequency;
+}
+
+/*!
+ \internal
*/
int QAudioFormat::frequency() const
@@ -242,7 +260,16 @@ int QAudioFormat::frequency() const
}
/*!
- Sets the channels to \a channels.
+ Sets the channel count to \a channels.
+*/
+
+void QAudioFormat::setChannelCount(int channels)
+{
+ d->channels = channels;
+}
+
+/*!
+ \internal
*/
void QAudioFormat::setChannels(int channels)
@@ -251,7 +278,16 @@ void QAudioFormat::setChannels(int channels)
}
/*!
- Returns the current channel value.
+ Returns the current channel count value.
+*/
+
+int QAudioFormat::channelCount() const
+{
+ return d->channels;
+}
+
+/*!
+ \internal
*/
int QAudioFormat::channels() const
@@ -260,7 +296,7 @@ int QAudioFormat::channels() const
}
/*!
- Sets the sampleSize to \a sampleSize.
+ Sets the sample size to the \a sampleSize specified.
*/
void QAudioFormat::setSampleSize(int sampleSize)
@@ -269,7 +305,7 @@ void QAudioFormat::setSampleSize(int sampleSize)
}
/*!
- Returns the current sampleSize value.
+ Returns the current sample size value.
*/
int QAudioFormat::sampleSize() const