Fix pullmode data lost problem in QAudioOutput(pulseaudio)
authorLing Hu <ling.hu@nokia.com>
Mon, 7 Nov 2011 01:49:09 +0000 (11:49 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 9 Nov 2011 00:24:14 +0000 (01:24 +0100)
commita8be7b6053b836aba27421450161408f2ad7a1e1
tree6c7980b66ebf61f0ae7c061f1e25a930f132a2c3
parent9eeb1389f57bc4c0cfd205c7d1aaaa8fe069f81e
Fix pullmode data lost problem in QAudioOutput(pulseaudio)

At each userFeed, m_bytesAvailable is not updated properly in pullmode,
so the pull data size become irrelevent to the size we can actually write.
This problem is fixed by checking the actual writable size each time
before pulling the data and limit the size of the pulled and written data.

Change-Id: I6f53e6348693ddf4e3c79e90d3c3d0c1ffc713aa
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
src/plugins/pulseaudio/qaudiooutput_pulse.cpp
src/plugins/pulseaudio/qaudiooutput_pulse.h