diff options
author | Mithra Pattison <mithra.pattison@nokia.com> | 2012-07-10 13:26:48 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-10 08:26:04 +0200 |
commit | 53fdcca36650970568f14b81814eb627cbabea43 (patch) | |
tree | a216aeb092d0ce10a0e5a7d163b23e704fddabd4 /src/plugins/audiocapture/audiocapturesession.cpp | |
parent | 952bd004bec78c6ae43253dc42d897c42c9f90cd (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 'src/plugins/audiocapture/audiocapturesession.cpp')
-rw-r--r-- | src/plugins/audiocapture/audiocapturesession.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/audiocapture/audiocapturesession.cpp b/src/plugins/audiocapture/audiocapturesession.cpp index 62e475d15..9493420d6 100644 --- a/src/plugins/audiocapture/audiocapturesession.cpp +++ b/src/plugins/audiocapture/audiocapturesession.cpp @@ -56,8 +56,8 @@ AudioCaptureSession::AudioCaptureSession(QObject *parent): m_position = 0; m_state = QMediaRecorder::StoppedState; - m_format.setFrequency(8000); - m_format.setChannels(1); + m_format.setSampleRate(8000); + m_format.setChannelCount(1); m_format.setSampleSize(8); m_format.setSampleType(QAudioFormat::UnSignedInt); m_format.setCodec("audio/pcm"); @@ -264,10 +264,10 @@ void AudioCaptureSession::record() memcpy(header.wave.descriptor.id,"fmt ",4); header.wave.descriptor.size = 16; header.wave.audioFormat = 1; // for PCM data - header.wave.numChannels = m_format.channels(); - header.wave.sampleRate = m_format.frequency(); - header.wave.byteRate = m_format.frequency()*m_format.channels()*m_format.sampleSize()/8; - header.wave.blockAlign = m_format.channels()*m_format.sampleSize()/8; + header.wave.numChannels = m_format.channelCount(); + header.wave.sampleRate = m_format.sampleRate(); + header.wave.byteRate = m_format.sampleRate()*m_format.channelCount()*m_format.sampleSize()/8; + header.wave.blockAlign = m_format.channelCount()*m_format.sampleSize()/8; header.wave.bitsPerSample = m_format.sampleSize(); memcpy(header.data.descriptor.id,"data",4); header.data.descriptor.size = 0xFFFFFFFF; // This should be updated on stop(),samples*channels*sampleSize/8 |