[Qt-interest] High CPU Usage With QAudioOutput

Barnes, Clifton A. cabarnes at indesign-llc.com
Wed Apr 6 13:41:33 CEST 2011


Hello All,

I'm trying to play a Signed 16 bit Little Endian, Rate 16000 Hz, Mono
audio .wav file using QAudioOutput on an embedded device.  During
playing of the file, I observe that the application is using 25% of
the CPU.  All I'm doing is opening a QFile pointing to the .wav
file, opening it, and passing it to the QAudioOutput::start function.
The audio plays correctly but the CPU usage seems way too high.  

I'm using Qt 4.6.2.  I have ALSA support compiled into the Qt 
libraries.  I've played the exact same file using aplay and the CPU 
usage is 1%.

What could be causing the high CPU usage when using QAudioOutput?  

Is there a more efficient way to use QAudioOutput?

Is there an alternative to QAudioOutput that I should be using?


Thanks for your help,

Clifton A Barnes





More information about the Qt-interest-old mailing list