diff options
author | Justin McPherson <justin.mcpherson@nokia.com> | 2010-01-28 02:26:30 (GMT) |
---|---|---|
committer | Justin McPherson <justin.mcpherson@nokia.com> | 2010-01-28 02:26:30 (GMT) |
commit | 566d525f5139955f1af61b21d16644e349b9fc7a (patch) | |
tree | cc7376b1640726b1817e5f1b9d2b3936282f3914 /src/multimedia/audio/qaudioinput_win32_p.cpp | |
parent | d2fa5b80d4f40ac67a7a74552390332551563466 (diff) | |
parent | c9691c62b62c656a9a153b8879f13a5ce71a6d2d (diff) | |
download | Qt-566d525f5139955f1af61b21d16644e349b9fc7a.zip Qt-566d525f5139955f1af61b21d16644e349b9fc7a.tar.gz Qt-566d525f5139955f1af61b21d16644e349b9fc7a.tar.bz2 |
Merge branch 'master' of ../../qt/master
Conflicts:
src/multimedia/audio/qaudiodeviceinfo.cpp
src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
src/multimedia/audio/qaudioformat.cpp
Diffstat (limited to 'src/multimedia/audio/qaudioinput_win32_p.cpp')
-rw-r--r-- | src/multimedia/audio/qaudioinput_win32_p.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/multimedia/audio/qaudioinput_win32_p.cpp b/src/multimedia/audio/qaudioinput_win32_p.cpp index dfbe2ec..84fd2a5 100644 --- a/src/multimedia/audio/qaudioinput_win32_p.cpp +++ b/src/multimedia/audio/qaudioinput_win32_p.cpp @@ -225,7 +225,7 @@ bool QAudioInputPrivate::open() header = 0; if(buffer_size == 0) { // Default buffer size, 100ms, default period size is 20ms - buffer_size = settings.sampleRate()*settings.channelCount()*(settings.sampleSize()/8)*0.1; + buffer_size = settings.frequency()*settings.channels()*(settings.sampleSize()/8)*0.1; period_size = buffer_size/5; } else { period_size = buffer_size/5; @@ -237,9 +237,9 @@ bool QAudioInputPrivate::open() #endif timeStamp.restart(); elapsedTimeOffset = 0; - wfx.nSamplesPerSec = settings.sampleRate(); + wfx.nSamplesPerSec = settings.frequency(); wfx.wBitsPerSample = settings.sampleSize(); - wfx.nChannels = settings.channelCount(); + wfx.nChannels = settings.channels(); wfx.cbSize = 0; wfx.wFormatTag = WAVE_FORMAT_PCM; @@ -379,8 +379,8 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len) } else { totalTimeValue += waveBlocks[header].dwBytesRecorded - /((settings.channelCount()*settings.sampleSize()/8)) - *10000/settings.sampleRate()*100; + /((settings.channels()*settings.sampleSize()/8)) + *10000/settings.frequency()*100; errorState = QAudio::NoError; deviceState = QAudio::ActiveState; resuming = false; @@ -393,8 +393,8 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len) qDebug()<<"IN: "<<waveBlocks[header].dwBytesRecorded<<", OUT: "<<l; #endif totalTimeValue += waveBlocks[header].dwBytesRecorded - /((settings.channelCount()*settings.sampleSize()/8)) - *10000/settings.sampleRate()*100; + /((settings.channels()*settings.sampleSize()/8)) + *10000/settings.frequency()*100; errorState = QAudio::NoError; deviceState = QAudio::ActiveState; resuming = false; |