[Qt-interest] two questions about QAudio*

Gabriel M. Beddingfield gabrbedd at gmail.com
Thu Aug 26 13:31:08 CEST 2010


On Thursday, August 26, 2010 05:34:44 am Maksim Kirillov 
wrote:
> 
> 1. QAudioDeviceInfo::defaultOutputDevice() returns "null"
> device, which does not produce any output. Is it the
> intended behavior? Is it possible by configuration to
> make it return other devices, like "pulse"?

No, it's supposed to return the default sound card.  This 
sounds like a bug.  What OS are you on?

> 2. Directly-constructed QAudioFormat seems to be always
> invalid. It seems that to use QAudioFormat, it must be
> taken from QAudioDeviceInfo::nearestFormat() or
> QAudioDeviceInfo::preferredFormat(). Is this correct?

What settings?  And what audio card?  If this is for the 
"null" audio device... then I can't imagine that any 
settings are valid.

It probably depends on the hardware.  Not every audio card 
supports every format.  For example, I have a pro audio card 
that only supports 32-bit Floats... and will choke on Signed 
16-bit Integers.  I don't think Qt is doing format 
conversions... so if the card doesn't support your format it 
will reject it.

-gabriel





More information about the Qt-interest-old mailing list