diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-12-17 09:30:19 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-01-20 19:12:57 +0000 |
commit | a0d7e8896bfad7eca1c3d393c72ea0f7ebeb79db (patch) | |
tree | 820c6c94f00784e403e3905de401ab9174f6f65f /src/plugins/opensles/qopenslesengine.h | |
parent | 58e74015c5239f269a1f0a59eabe43e92c47acd5 (diff) |
Move the android audio code into QtMultimedia
Change-Id: I879641ae2dfc8d171afb3cc6db8bad27120dcf7c
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/plugins/opensles/qopenslesengine.h')
-rw-r--r-- | src/plugins/opensles/qopenslesengine.h | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/src/plugins/opensles/qopenslesengine.h b/src/plugins/opensles/qopenslesengine.h deleted file mode 100644 index c36b21488..000000000 --- a/src/plugins/opensles/qopenslesengine.h +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QOPENSLESENGINE_H -#define QOPENSLESENGINE_H - -#include <qglobal.h> -#include <qaudio.h> -#include <qlist.h> -#include <qaudioformat.h> -#include <SLES/OpenSLES.h> - -QT_BEGIN_NAMESPACE - -class QOpenSLESEngine -{ -public: - enum OutputValue { FramesPerBuffer, SampleRate }; - - QOpenSLESEngine(); - ~QOpenSLESEngine(); - - static QOpenSLESEngine *instance(); - - SLEngineItf slEngine() const { return m_engine; } - - static SLDataFormat_PCM audioFormatToSLFormatPCM(const QAudioFormat &format); - - QByteArray defaultDevice(QAudio::Mode mode) const; - QList<QByteArray> availableDevices(QAudio::Mode mode) const; - QList<int> supportedChannelCounts(QAudio::Mode mode) const; - QList<int> supportedSampleRates(QAudio::Mode mode) const; - - static int getOutputValue(OutputValue type, int defaultValue = 0); - static int getDefaultBufferSize(const QAudioFormat &format); - static int getLowLatencyBufferSize(const QAudioFormat &format); - static bool supportsLowLatency(); - static bool printDebugInfo(); - -private: - void checkSupportedInputFormats(); - bool inputFormatIsSupported(SLDataFormat_PCM format); - - SLObjectItf m_engineObject; - SLEngineItf m_engine; - - QList<int> m_supportedInputChannelCounts; - QList<int> m_supportedInputSampleRates; - bool m_checkedInputFormats; -}; - -QT_END_NAMESPACE - -#endif // QOPENSLESENGINE_H |