summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin McPherson <justin.mcpherson@nokia.com>2010-03-24 02:51:58 (GMT)
committerJustin McPherson <justin.mcpherson@nokia.com>2010-03-24 04:36:56 (GMT)
commite887e0c38b5497757dfc69190c5a86cdc8104097 (patch)
tree7bfa65d08581b03df86c1a82eb635a1669954b3a
parent7d89ca8957ed4aac56822001d4ef84913e7362ae (diff)
downloadQt-e887e0c38b5497757dfc69190c5a86cdc8104097.zip
Qt-e887e0c38b5497757dfc69190c5a86cdc8104097.tar.gz
Qt-e887e0c38b5497757dfc69190c5a86cdc8104097.tar.bz2
Calculate period size correctly.
Reviewed-by:Dmytro Poplavskiy
-rw-r--r--src/multimedia/audio/qaudioinput_mac_p.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/multimedia/audio/qaudioinput_mac_p.cpp b/src/multimedia/audio/qaudioinput_mac_p.cpp
index 4b37b18..cb65f6e 100644
--- a/src/multimedia/audio/qaudioinput_mac_p.cpp
+++ b/src/multimedia/audio/qaudioinput_mac_p.cpp
@@ -670,8 +670,8 @@ bool QAudioInputPrivate::open()
}
// Allocate buffer
- periodSizeBytes = (numberOfFrames * streamFormat.mSampleRate / deviceFormat.mSampleRate) *
- streamFormat.mBytesPerFrame;
+ periodSizeBytes = numberOfFrames * streamFormat.mBytesPerFrame;
+
if (internalBufferSize < periodSizeBytes * 2)
internalBufferSize = periodSizeBytes * 2;
else