hi all, i am developing chat voice LAN QAudioOutput similar example: http://doc.qt.nokia.com/latest/multi...utput-cpp.html

Qt Code:
  1. qint64 Generator::readData(char *data, qint64 len)
  2. {
  3. qint64 total = 0;
  4. while (len - total > 0) {
  5. const qint64 chunk = qMin((m_buffer.size() - m_pos), len - total);
  6. memcpy(data + total, m_buffer.constData() + m_pos, chunk);
  7. m_pos = (m_pos + chunk) % m_buffer.size();
  8. total += chunk;
  9. }
  10. return total;
  11. }
To copy to clipboard, switch view to plain text mode 

, my problem is when network lag connect 2 client, when client cant recive data from other client, it will play again old data.

i want audio buffer only play data appended in m_buffer,

thanks and best regard