From 53fdcca36650970568f14b81814eb627cbabea43 Mon Sep 17 00:00:00 2001 From: Mithra Pattison Date: Tue, 10 Jul 2012 13:26:48 +1000 Subject: 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 --- src/plugins/audiocapture/audiocapturesession.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/plugins/audiocapture/audiocapturesession.cpp') 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 -- cgit v1.2.3