summaryrefslogtreecommitdiffstats
path: root/tests/auto/integration/qaudiooutput/wavheader.cpp
diff options
context:
space:
mode:
authorMithra Pattison <mithra.pattison@nokia.com>2012-07-10 13:26:48 +1000
committerQt by Nokia <qt-info@nokia.com>2012-07-10 08:26:04 +0200
commit53fdcca36650970568f14b81814eb627cbabea43 (patch)
treea216aeb092d0ce10a0e5a7d163b23e704fddabd4 /tests/auto/integration/qaudiooutput/wavheader.cpp
parent952bd004bec78c6ae43253dc42d897c42c9f90cd (diff)
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>
Diffstat (limited to 'tests/auto/integration/qaudiooutput/wavheader.cpp')
-rwxr-xr-xtests/auto/integration/qaudiooutput/wavheader.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/integration/qaudiooutput/wavheader.cpp b/tests/auto/integration/qaudiooutput/wavheader.cpp
index f73ae8ba1..770540ac4 100755
--- a/tests/auto/integration/qaudiooutput/wavheader.cpp
+++ b/tests/auto/integration/qaudiooutput/wavheader.cpp
@@ -111,9 +111,9 @@ bool WavHeader::read(QIODevice &device)
else
m_format.setByteOrder(QAudioFormat::BigEndian);
- m_format.setChannels(qFromLittleEndian<quint16>(header.wave.numChannels));
+ m_format.setChannelCount(qFromLittleEndian<quint16>(header.wave.numChannels));
m_format.setCodec("audio/pcm");
- m_format.setFrequency(qFromLittleEndian<quint32>(header.wave.sampleRate));
+ m_format.setSampleRate(qFromLittleEndian<quint32>(header.wave.sampleRate));
m_format.setSampleSize(qFromLittleEndian<quint16>(header.wave.bitsPerSample));
switch(header.wave.bitsPerSample) {
@@ -158,13 +158,13 @@ bool WavHeader::write(QIODevice &device)
reinterpret_cast<unsigned char*>(&header.wave.descriptor.size));
qToLittleEndian<quint16>(quint16(1),
reinterpret_cast<unsigned char*>(&header.wave.audioFormat));
- qToLittleEndian<quint16>(quint16(m_format.channels()),
+ qToLittleEndian<quint16>(quint16(m_format.channelCount()),
reinterpret_cast<unsigned char*>(&header.wave.numChannels));
- qToLittleEndian<quint32>(quint32(m_format.frequency()),
+ qToLittleEndian<quint32>(quint32(m_format.sampleRate()),
reinterpret_cast<unsigned char*>(&header.wave.sampleRate));
- qToLittleEndian<quint32>(quint32(m_format.frequency() * m_format.channels() * m_format.sampleSize() / 8),
+ qToLittleEndian<quint32>(quint32(m_format.sampleRate() * m_format.channelCount() * m_format.sampleSize() / 8),
reinterpret_cast<unsigned char*>(&header.wave.byteRate));
- qToLittleEndian<quint16>(quint16(m_format.channels() * m_format.sampleSize() / 8),
+ qToLittleEndian<quint16>(quint16(m_format.channelCount() * m_format.sampleSize() / 8),
reinterpret_cast<unsigned char*>(&header.wave.blockAlign));
qToLittleEndian<quint16>(quint16(m_format.sampleSize()),
reinterpret_cast<unsigned char*>(&header.wave.bitsPerSample));