Delete obsolete class methods and update related code

Delete obsolete methods from QAudioFormat and QAudioDeviceInfo
and update code that relied on the obsolete methods.

Change-Id: I007e36375a45399b1d5a289341bc5d5a05dc68cc
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
Mithra Pattison
2012-07-10 13:26:48 +10:00
committed by Qt by Nokia
parent 952bd004be
commit 53fdcca366
47 changed files with 301 additions and 385 deletions

View File

@@ -50,7 +50,7 @@ void generateTone(const SweptTone &tone, const QAudioFormat &format, QByteArray
Q_ASSERT(isPCMS16LE(format));
const int channelBytes = format.sampleSize() / 8;
const int sampleBytes = format.channels() * channelBytes;
const int sampleBytes = format.channelCount() * channelBytes;
int length = buffer.size();
const int numSamples = buffer.size() / sampleBytes;
@@ -61,7 +61,7 @@ void generateTone(const SweptTone &tone, const QAudioFormat &format, QByteArray
qreal phase = 0.0;
const qreal d = 2 * M_PI / format.frequency();
const qreal d = 2 * M_PI / format.sampleRate();
// We can't generate a zero-frequency sine wave
const qreal startFreq = tone.startFreq ? tone.startFreq : 1.0;
@@ -76,7 +76,7 @@ void generateTone(const SweptTone &tone, const QAudioFormat &format, QByteArray
while (length) {
const qreal x = tone.amplitude * qSin(phase);
const qint16 value = realToPcm(x);
for (int i=0; i<format.channels(); ++i) {
for (int i=0; i<format.channelCount(); ++i) {
qToLittleEndian<qint16>(value, ptr);
ptr += channelBytes;
length -= channelBytes;