[Qt-interest] High CPU Usage With QAudioOutput
Gabriel M. Beddingfield
gabrbedd at gmail.com
Wed Apr 6 15:41:31 CEST 2011
On Wed, 6 Apr 2011, Barnes, Clifton A. wrote:
> On Wednesday, April 06, 2011 8:48 AM Jason H wrote:
>
>> I'd go with the Qt Mobility stuff. I'm not sure how QAudioOutput works, but I
>> know Qt Mobility uses your platform's back end which should be hardware
>> accelerated on most platforms.
>
> I looked at the Qt Mobility source:
>
> http://qt.gitorious.org/qt-mobility/qt-mobility/trees/master/src/multimedia/audio
>
> and it appears to be using all of the same QAudioOutput files as the main Qt
That's correct. In the future, Qt is spinning off
modules... so the QtMultimedia classes (like QAudioOutput)
will now be part of the QtMobility module instead of Qt
You said that you were passing a .wav file to the
QAudioOutput... but I don't think this is correct. It is
expecting a RAW PCM stream, and you need to set the format.
However, a .wav file has metadata etc.
Also, if you don't properly set your audio format... you
could be getting extra resampling or sample conversions.
-gabriel
More information about the Qt-interest-old
mailing list