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
@@ -123,7 +123,7 @@ qint64 AudioInfo::writeData(const char *data, qint64 len)
|
||||
if (m_maxAmplitude) {
|
||||
Q_ASSERT(m_format.sampleSize() % 8 == 0);
|
||||
const int channelBytes = m_format.sampleSize() / 8;
|
||||
const int sampleBytes = m_format.channels() * channelBytes;
|
||||
const int sampleBytes = m_format.channelCount() * channelBytes;
|
||||
Q_ASSERT(len % sampleBytes == 0);
|
||||
const int numSamples = len / sampleBytes;
|
||||
|
||||
@@ -131,7 +131,7 @@ qint64 AudioInfo::writeData(const char *data, qint64 len)
|
||||
const unsigned char *ptr = reinterpret_cast<const unsigned char *>(data);
|
||||
|
||||
for (int i = 0; i < numSamples; ++i) {
|
||||
for(int j = 0; j < m_format.channels(); ++j) {
|
||||
for (int j = 0; j < m_format.channelCount(); ++j) {
|
||||
quint16 value = 0;
|
||||
|
||||
if (m_format.sampleSize() == 8 && m_format.sampleType() == QAudioFormat::UnSignedInt) {
|
||||
@@ -263,8 +263,8 @@ void InputTest::initializeAudio()
|
||||
{
|
||||
m_pullMode = true;
|
||||
|
||||
m_format.setFrequency(8000);
|
||||
m_format.setChannels(1);
|
||||
m_format.setSampleRate(8000);
|
||||
m_format.setChannelCount(1);
|
||||
m_format.setSampleSize(16);
|
||||
m_format.setSampleType(QAudioFormat::SignedInt);
|
||||
m_format.setByteOrder(QAudioFormat::LittleEndian);
|
||||
|
||||
Reference in New Issue
Block a user