Record and play audio using Qt

I am trying to develop a multimedia program using Qt that receives an audio input stream from a microphone (using QAudioInput ), then stores the sampled bytes in memory for 60 milliseconds, then plays them (using QAudioOutput ).

There is an example in the documentation for QAudioOuput that does most of this, but instead uses the file as a data source. How can I change this to use the input stream instead?

+4
source share
1 answer
QAudioInput :: start both parameters take a pointer to a QIODevice as a parameter. This can be a pointer to a QFile (as in the example) or a QBuffer if you want to store data in memory.
+5
source

Source: https://habr.com/ru/post/1338803/


All Articles