4#ifndef QOPENSLESAUDIOOUTPUT_H
5#define QOPENSLESAUDIOOUTPUT_H
18#include <private/qaudiosystem_p.h>
19#include <SLES/OpenSLES.h>
22#include <QElapsedTimer>
38 void reset()
override;
60 static void playCallback(SLPlayItf playItf,
void *
ctx, SLuint32
event);
61 static void bufferQueueCallback(SLBufferQueueItf bufferQueue,
void *
ctx);
73 SLmillibel adjustVolume(
qreal vol);
75 static constexpr int BufferCount = 2;
81 SLObjectItf m_outputMixObject =
nullptr;
82 SLObjectItf m_playerObject =
nullptr;
83 SLPlayItf m_playItf =
nullptr;
84 SLVolumeItf m_volumeItf =
nullptr;
85 SLBufferQueueItf m_bufferQueueItf =
nullptr;
87 char *m_buffers =
nullptr;
89 bool m_pullMode =
false;
93 qint64 m_processedBytes = 0;
95 SLuint32 m_eventMask = SL_PLAYEVENT_HEADATEND;
96 bool m_startRequiresInit =
true;
121 return m_audioDevice->writeData(
data,
len);
IOBluetoothDevice * device
qsizetype bytesFree() const override
void setVolume(qreal volume) override
qsizetype bufferSize() const override
QIODevice * start() override
QAudioFormat format() const override
QAudio::Error error() const override
QAudio::State state() const override
qint64 processedUSecs() const override
qreal volume() const override
void setFormat(const QAudioFormat &format) override
void setBufferSize(qsizetype value) override
\inmodule QtCore \reentrant
QObject * parent() const
Returns a pointer to the parent object.
SLIODevicePrivate(QAndroidAudioSink *audio)
qint64 readData(char *, qint64) override
Reads up to maxSize bytes from the device into data, and returns the number of bytes read or -1 if an...
qint64 writeData(const char *data, qint64 len) override
Writes up to maxSize bytes from data to the device.
~SLIODevicePrivate() override
State
\value ActiveState Audio data is being processed, this state is set after start() is called and while...
Error
\value NoError No errors have occurred \value OpenError An error occurred opening the audio device \v...
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint GLsizei GLsizei GLenum format
static void setError(QJsonObject *response, const QString &msg)
void writeData(const QByteArray &data)