[Qt-interest] High CPU Usage With QAudioOutput

Justin McPherson justin.mcpherson at nokia.com
Thu Apr 7 08:14:18 CEST 2011


It shouldn't. You should file a bug.

All the comments about .wav etc are true, but probably not related. Most 
.wav files in the wild have PCM data inside, and apart from odd bursts 
of noise, should at least "work" when passed directly to QAudioOutput 
via the start(QIODevice*) method - if you have the correct format set.

Code to look at would be nice, if you can.


- Justin



On 6/04/11 9:41 PM, ext Barnes, Clifton A. wrote:
> 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
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list