Results 1 to 2 of 2

Thread: QaudioOutput play buffer audio real time disconnect network ?

  1. #1
    Join Date
    Jun 2010
    Posts
    102
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default QaudioOutput play buffer audio real time disconnect network ?

    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
    Contact: Skype: sonnh89
    Yahoo: nhs_0702@yahoo.com

    Liên hệ SKype: sonnh89

  2. #2
    Join Date
    Jun 2010
    Posts
    102
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QaudioOutput play buffer audio real time disconnect network ?

    can you help me
    Contact: Skype: sonnh89
    Yahoo: nhs_0702@yahoo.com

    Liên hệ SKype: sonnh89

Similar Threads

  1. QaudioOutPut Stream Audio In Chat Voice ?
    By Thành Viên Mới in forum Qt Programming
    Replies: 2
    Last Post: 17th June 2011, 03:33
  2. QAudioOutput Play Audio Buffer chat voice ?
    By Thành Viên Mới in forum Qt Programming
    Replies: 5
    Last Post: 11th May 2011, 19:35
  3. Unable to play audio outside Qt creator
    By somnathbanik in forum Newbie
    Replies: 0
    Last Post: 9th November 2010, 06:47
  4. QAudioOutput buffer underrun
    By BartBlackMagic in forum Qt Programming
    Replies: 1
    Last Post: 16th September 2010, 17:44
  5. play audio url
    By tungvc in forum Qt Programming
    Replies: 0
    Last Post: 15th July 2010, 11:04

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.