diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-09-22 12:55:00 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-09-22 12:55:00 (GMT) |
commit | 9a5a12a5fe5bdf848756ddad20dabe288a6873de (patch) | |
tree | 4116fe2b23d8689f7f10688d338c7fc8abe46b1e /examples/multimedia | |
parent | 0d446ec758aacd131f2da0fa67a081fd93cff898 (diff) | |
parent | b7ba409b0dabd382876310a6c110a96cf0e3c6bf (diff) | |
download | Qt-9a5a12a5fe5bdf848756ddad20dabe288a6873de.zip Qt-9a5a12a5fe5bdf848756ddad20dabe288a6873de.tar.gz Qt-9a5a12a5fe5bdf848756ddad20dabe288a6873de.tar.bz2 |
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts:
src/gui/painting/qtextureglyphcache_p.h
src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
Diffstat (limited to 'examples/multimedia')
-rw-r--r-- | examples/multimedia/audiooutput/audiooutput.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/multimedia/audiooutput/audiooutput.cpp b/examples/multimedia/audiooutput/audiooutput.cpp index 4e74a25..93020bc 100644 --- a/examples/multimedia/audiooutput/audiooutput.cpp +++ b/examples/multimedia/audiooutput/audiooutput.cpp @@ -132,9 +132,9 @@ void Generator::generateData(const QAudioFormat &format, qint64 durationUs, int qint64 Generator::readData(char *data, qint64 len) { qint64 total = 0; - while (len - total) { + while (len - total > 0) { const qint64 chunk = qMin((m_buffer.size() - m_pos), len - total); - memcpy(data, m_buffer.constData() + m_pos, chunk); + memcpy(data + total, m_buffer.constData() + m_pos, chunk); m_pos = (m_pos + chunk) % m_buffer.size(); total += chunk; } |