I need to process audio data in realtime (without writing to drive as in examples). For this purpose I use QAudioInput from QtMultimedia (Qt 4.7.3, Mac OS X 10.5.8) which works in a "push" mode:

Qt Code:
  1. QAudioInput* m_pStream = new QAudioInput(Format, this);
  2. QIODevice* m_pBuffer = m_pStream->start();
  3. connect(m_pBuffer, SIGNAL(readyRead()), this, SLOT(SendData()));
To copy to clipboard, switch view to plain text mode 

Slot SendData reads buffer and sends data to the processing algorithm:

Qt Code:
  1. void CQtAudioStream::SendData()
  2. {
  3. Q_ASSERT(m_pBuffer);
  4.  
  5. emit SendAudioBuffer(m_pBuffer->readAll().data());
  6. }
To copy to clipboard, switch view to plain text mode 

The problem is readyRead() signal emits only once from m_pBuffer device. What should I do to reemit it?