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:
committed by
Qt by Nokia
parent
952bd004be
commit
53fdcca366
@@ -50,9 +50,9 @@ AudioDecoder::AudioDecoder(bool isPlayback, bool isDelete)
|
||||
// Make sure the data we receive is in correct PCM format.
|
||||
// Our wav file writer only supports SignedInt sample type.
|
||||
QAudioFormat format;
|
||||
format.setChannels(2);
|
||||
format.setChannelCount(2);
|
||||
format.setSampleSize(16);
|
||||
format.setFrequency(48000);
|
||||
format.setSampleRate(48000);
|
||||
format.setCodec("audio/pcm");
|
||||
format.setSampleType(QAudioFormat::SignedInt);
|
||||
m_decoder.setAudioFormat(format);
|
||||
|
||||
@@ -152,10 +152,10 @@ bool WaveFileWriter::writeHeader(const QAudioFormat& format)
|
||||
memcpy(header.wave.descriptor.id, "fmt ", 4);
|
||||
header.wave.descriptor.size = quint32(16);
|
||||
header.wave.audioFormat = quint16(1);
|
||||
header.wave.numChannels = quint16(format.channels());
|
||||
header.wave.numChannels = quint16(format.channelCount());
|
||||
header.wave.sampleRate = quint32(format.sampleRate());
|
||||
header.wave.byteRate = quint32(format.sampleRate() * format.channels() * format.sampleSize() / 8);
|
||||
header.wave.blockAlign = quint16(format.channels() * format.sampleSize() / 8);
|
||||
header.wave.byteRate = quint32(format.sampleRate() * format.channelCount() * format.sampleSize() / 8);
|
||||
header.wave.blockAlign = quint16(format.channelCount() * format.sampleSize() / 8);
|
||||
header.wave.bitsPerSample = quint16(format.sampleSize());
|
||||
|
||||
// DATA header
|
||||
|
||||
Reference in New Issue
Block a user