Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qandroidaudiodevice.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5
6#include "qopenslesengine_p.h"
7
9
12 m_engine(QOpenSLESEngine::instance())
13{
14 description = desc;
15
16 auto channels = m_engine->supportedChannelCounts(mode);
17 if (channels.size()) {
18 minimumChannelCount = channels.first();
19 maximumChannelCount = channels.last();
20 }
21
22 auto sampleRates = m_engine->supportedSampleRates(mode);
23 if (sampleRates.size()) {
24 minimumSampleRate = sampleRates.first();
25 maximumSampleRate = sampleRates.last();
26 }
30
37}
38
IOBluetoothDevice * device
QAudioFormat preferredFormat
QList< QAudioFormat::SampleFormat > supportedSampleFormats
Mode
Describes the mode of this device.
constexpr void setSampleRate(int sampleRate) noexcept
Sets the sample rate to samplerate in Hertz.
SampleFormat
Qt will always expect and use samples in the endianness of the host platform.
constexpr void setSampleFormat(SampleFormat f) noexcept
Sets the sample format to format.
constexpr void setChannelCount(int channelCount) noexcept
Sets the channel count to channels.
\inmodule QtCore
Definition qbytearray.h:57
T & first()
Definition qlist.h:645
T value(qsizetype i) const
Definition qlist.h:664
void append(parameter_type t)
Definition qlist.h:458
QOpenSLESDeviceInfo(const QByteArray &device, const QString &desc, QAudioDevice::Mode mode)
QList< int > supportedSampleRates(QAudioDevice::Mode mode) const
QList< int > supportedChannelCounts(QAudioDevice::Mode mode) const
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
GLenum mode
GLfloat GLfloat f
bool contains(const AT &t) const noexcept
Definition qlist.h:45