PDA

View Full Version : QT and streaming audio from a vector of doubles



gowen
27th January 2011, 17:55
Hello

I am looking to try and use QAudioOuput within my QT program.

I am reading some data from a file which I can convert either to a vector of doubles or floats and would like to output this to an audio device. I read in a seconds worth of data every second and would like to get an audio device to play this as it iterates through the data.

I have seen that this may be achievable through QIODevice and Qbuffer to buffer the data into a QByteArray. Although I am not sure what this would entail or if indeed I am overcomplicating the issue.

If anyone could help or if they have a small example it would be greatly appreciated!

Many Thanks
Geoff