start the input and output device like this


Qt Code:
  1. m_output= m_audioOutput->start();
  2. m_input = m_audioInput->start();
  3. connect(m_input, SIGNAL(readyRead()), SLOT(readMore()));
To copy to clipboard, switch view to plain text mode 

and write the input sample to output in readMore()
Qt Code:
  1. m_output->write(outdata, len);
To copy to clipboard, switch view to plain text mode 

Check this article in code project that record from microphone and play back to speaker simultaneously

http://www.codeproject.com/Articles/...essing-Utility