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
qopenslesengine_p.h
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
4#ifndef QOPENSLESENGINE_H
5#define QOPENSLESENGINE_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <qglobal.h>
19#include <qaudio.h>
20#include <qlist.h>
21#include <qaudioformat.h>
22#include <qaudiodevice.h>
23#include <SLES/OpenSLES_Android.h>
24
26
28{
29public:
31
34
35 static QOpenSLESEngine *instance();
36
37 SLEngineItf slEngine() const { return m_engine; }
38
39 static SLAndroidDataFormat_PCM_EX audioFormatToSLFormatPCM(const QAudioFormat &format);
40
41 static QList<QAudioDevice> availableDevices(QAudioDevice::Mode mode);
42 static bool setAudioOutput(const QByteArray &deviceId);
45
46 static int getOutputValue(OutputValue type, int defaultValue = 0);
47 static int getDefaultBufferSize(const QAudioFormat &format);
49 static bool supportsLowLatency();
50 static bool printDebugInfo();
51
52private:
53 void checkSupportedInputFormats();
54 bool inputFormatIsSupported(SLAndroidDataFormat_PCM_EX format);
55 SLObjectItf m_engineObject;
56 SLEngineItf m_engine;
57
58 QList<int> m_supportedInputChannelCounts;
59 QList<int> m_supportedInputSampleRates;
60 bool m_checkedInputFormats;
61};
62
64
65#endif // QOPENSLESENGINE_H
Mode
Describes the mode of this device.
The QAudioFormat class stores audio stream parameter information.
\inmodule QtCore
Definition qbytearray.h:57
static int getLowLatencyBufferSize(const QAudioFormat &format)
static QOpenSLESEngine * instance()
static int getOutputValue(OutputValue type, int defaultValue=0)
SLEngineItf slEngine() const
static int getDefaultBufferSize(const QAudioFormat &format)
static SLAndroidDataFormat_PCM_EX audioFormatToSLFormatPCM(const QAudioFormat &format)
static QList< QAudioDevice > availableDevices(QAudioDevice::Mode mode)
static bool supportsLowLatency()
static bool printDebugInfo()
QList< int > supportedSampleRates(QAudioDevice::Mode mode) const
QList< int > supportedChannelCounts(QAudioDevice::Mode mode) const
static bool setAudioOutput(const QByteArray &deviceId)
Combined button and popup list for selecting options.
GLenum mode
GLenum type
GLint GLsizei GLsizei GLenum format