[Qt-interest] High CPU Usage With QAudioOutput
Barnes, Clifton A.
cabarnes at indesign-llc.com
Wed Apr 6 17:17:05 CEST 2011
On Wed, 6 Apr 2011, Gabriel M. Beddingfield wrote:
>> format.setCodec("audio/pcm");
> This is line incorrect, since you're actually sending
> audio/x-wav
I've changed the codec, but there was no change.
> Just curious... did you first check if the format is
> supported?
I've checked QAudioFormat::isValid if that's what you mean
by supported. If not, how can I check if it's supported?
> Also, is it going to PulseAudio instead of your
> sound card? My guess is that something is triggering
> resampling.
There is no sound daemon like PulseAudio. It's just using
alsa-lib. Would ALSA try to resample? Where can I check if
it is?
> Also, if you're really just wanting phonon-like media
> playback... you should check out QMediaPlayer. QAudioOutput
> is really for low-level stuff (like if you're writing a
> synthesizer or sampler something).
All I need is to simply play a sound. Would it make more
sense to just use a raw audio file with QAudioOutput instead
of a .wav? Do I need to use QMediaPlayer for such a simple
task? Also, isn't it part of Qt Mobility that uses the
QAudioOutput underneath?
Clif
More information about the Qt-interest-old
mailing list