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

@@ -49,8 +49,8 @@ QAudioFormat toQAudioFormat(AudioStreamBasicDescription const& sf)
{
QAudioFormat audioFormat;
audioFormat.setFrequency(sf.mSampleRate);
audioFormat.setChannels(sf.mChannelsPerFrame);
audioFormat.setSampleRate(sf.mSampleRate);
audioFormat.setChannelCount(sf.mChannelsPerFrame);
audioFormat.setSampleSize(sf.mBitsPerChannel);
audioFormat.setCodec(QString::fromLatin1("audio/pcm"));
audioFormat.setByteOrder((sf.mFormatFlags & kAudioFormatFlagIsBigEndian) != 0 ? QAudioFormat::BigEndian : QAudioFormat::LittleEndian);
@@ -69,9 +69,9 @@ AudioStreamBasicDescription toAudioStreamBasicDescription(QAudioFormat const& au
AudioStreamBasicDescription sf;
sf.mFormatFlags = kAudioFormatFlagIsPacked;
sf.mSampleRate = audioFormat.frequency();
sf.mSampleRate = audioFormat.sampleRate();
sf.mFramesPerPacket = 1;
sf.mChannelsPerFrame = audioFormat.channels();
sf.mChannelsPerFrame = audioFormat.channelCount();
sf.mBitsPerChannel = audioFormat.sampleSize();
sf.mBytesPerFrame = sf.mChannelsPerFrame * (sf.mBitsPerChannel / 8);
sf.mBytesPerPacket = sf.mFramesPerPacket * sf.mBytesPerFrame;