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>
This commit is contained in:
@@ -107,7 +107,6 @@ private:
|
||||
qint64 write(const char *data, qint64 len);
|
||||
|
||||
private Q_SLOTS:
|
||||
bool deviceReady();
|
||||
void userFeed();
|
||||
|
||||
private:
|
||||
@@ -119,7 +118,6 @@ private:
|
||||
bool m_pullMode;
|
||||
bool m_opened;
|
||||
QIODevice *m_audioSource;
|
||||
int m_bytesAvailable;
|
||||
QTimer m_periodTimer;
|
||||
pa_stream *m_stream;
|
||||
int m_notifyInterval;
|
||||
|
||||
Reference in New Issue
Block a user