43 #include <QtMultimedia/qaudioengine.h> 44 #include <QtMultimedia/qaudiodeviceinfo.h> 46 #include <QtCore/qmap.h> 266 foreach (
int size, sampleSizesAvailable) {
270 int diff = larger - smaller;
271 testSampleSizes.
insert(diff, size);
279 foreach (
int frequency, frequenciesAvailable) {
283 int diff = larger - smaller;
284 testFrequencies.
insert(diff, frequency);
290 QMapIterator<int, int> sz(testSampleSizes);
291 while (sz.hasNext()) {
294 QMapIterator<int, int> i(testFrequencies);
295 while (i.hasNext()) {
QAudioDeviceInfoPrivate()
static QList< QAudioDeviceInfo > availableDevices(QAudio::Mode mode)
Returns a list of audio devices that support mode.
QByteArray handle() const
#define QT_END_NAMESPACE
This macro expands to.
QList< QAudioFormat::SampleType > supportedSampleTypes() const
Returns a list of supported sample types.
QList< int > supportedSampleSizes() const
Returns a list of supported sample sizes.
static QList< QAudioDeviceInfo > availableDevices(QAudio::Mode mode)
The QByteArray class provides an array of bytes.
QAudioDeviceInfo()
Constructs an empty QAudioDeviceInfo object.
QAbstractAudioDeviceInfo * info
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
virtual QList< int > sampleSizeList()=0
Returns the list of currently available sample sizes.
The QString class provides a Unicode character string.
QList< int > supportedChannelCounts() const
Returns a list of supported channel counts.
virtual bool isFormatSupported(const QAudioFormat &format) const =0
Returns true if format is available from audio device.
QList< int > supportedSampleRates() const
Returns a list of supported sample rates.
QSharedDataPointer< QAudioDeviceInfoPrivate > d
QList< int > supportedChannels() const
Use supportedChannelCount() instead.
#define QT_BEGIN_NAMESPACE
This macro expands to.
QBool contains(const T &t) const
Returns true if the list contains an occurrence of value; otherwise returns false.
static QAudioDeviceInfo defaultOutputDevice()
Returns the name of the default output audio device.
bool isFormatSupported(const QAudioFormat &format) const
Returns true if settings are supported by the audio device of this QAudioDeviceInfo.
~QAudioDeviceInfo()
Destroy this audio device info.
The QStringList class provides a list of strings.
QList< QAudioFormat::Endian > supportedByteOrders() const
Returns a list of supported byte orders.
The QAudioDeviceInfo class provides an interface to query audio devices and their functionality...
~QAudioDeviceInfoPrivate()
virtual QString deviceName() const =0
Returns the audio device name.
virtual QStringList codecList()=0
Returns the list of currently available codecs.
QAudio::Mode mode() const
virtual QAudioFormat preferredFormat() const =0
Returns the nearest settings.
QList< int > supportedFrequencies() const
Use supportedSampleRates() instead.
QAudioFormat nearestFormat(const QAudioFormat &format) const
Returns closest QAudioFormat to settings that system audio supports.
The QSharedData class is a base class for shared data objects.
QString deviceName() const
Returns human readable name of audio device.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key key and a value of value.
QAudioDeviceInfo & operator=(const QAudioDeviceInfo &other)
Sets the QAudioDeviceInfo object to be equal to other.
static QAudioDeviceInfo defaultInputDevice()
virtual QList< int > channelsList()=0
Returns the list of currently available channels.
QAudioDeviceInfoPrivate & operator=(const QAudioDeviceInfoPrivate &other)
The QAbstractAudioDeviceInfo class provides access for QAudioDeviceInfo to access the audio device pr...
static QAudioDeviceInfo defaultOutputDevice()
bool isNull() const
Returns whether this QAudioDeviceInfo object holds a device definition.
QAudioDeviceInfoPrivate(const QAudioDeviceInfoPrivate &other)
QAudioFormat preferredFormat() const
Returns QAudioFormat of default settings.
static QAbstractAudioDeviceInfo * audioDeviceInfo(const QString &realm, const QByteArray &handle, QAudio::Mode mode)
virtual QList< QAudioFormat::SampleType > sampleTypeList()=0
Returns the list of currently available sample types.
QAudioDeviceInfoPrivate(const QString &r, const QByteArray &h, QAudio::Mode m)
QStringList supportedCodecs() const
Returns a list of supported codecs.
virtual QList< int > frequencyList()=0
Returns the list of currently available frequencies.
static QAudioDeviceInfo defaultInputDevice()
Returns the name of the default input audio device.
virtual QList< QAudioFormat::Endian > byteOrderList()=0
Returns the list of currently available byte orders.
int removeAll(const T &t)
Removes all occurrences of value in the list and returns the number of entries removed.