Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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 <private/qaudioformat_p.h>
7
8#include <QtCore/qjniobject.h>
9
11
12QAndroidAudioDevice::QAndroidAudioDevice(QByteArray device, QString desc, QAudioDevice::Mode mode,
14 bool isDefaultDevice)
15 : QAudioDevicePrivate(std::move(device), mode, std::move(desc)),
16 m_isBluetoothDevice(isBluetoothDevice)
17{
18 isDefault = isDefaultDevice;
19 preferredFormat = format;
20
21 // Report support for everything that Qt supports, as Android should be able to resample and
22 // up/downmix if needed
23 minimumChannelCount = 1;
24 maximumChannelCount = 32;
25 minimumSampleRate = QtMultimediaPrivate::allSupportedSampleRates.front();
26 maximumSampleRate = QtMultimediaPrivate::allSupportedSampleRates.back();
27 supportedSampleFormats = QList<QAudioFormat::SampleFormat>{
28 QtMultimediaPrivate::allSupportedSampleFormats.begin(),
29 QtMultimediaPrivate::allSupportedSampleFormats.end()
30 };
31}
32
33bool QAndroidAudioDevice::isBluetoothDevice() const
34{
35 return m_isBluetoothDevice;
36}
37
38QT_END_NAMESPACE
\inmodule QtCore
Definition qbytearray.h:58