4#ifndef QAUDIOOUTPUTPULSE_H
5#define QAUDIOOUTPUTPULSE_H
18#include <QtCore/qfile.h>
19#include <QtCore/qtimer.h>
20#include <QtCore/qstring.h>
21#include <QtCore/qstringlist.h>
22#include <QtCore/qelapsedtimer.h>
23#include <QtCore/qiodevice.h>
29#include <private/qaudiosystem_p.h>
31#include <pulse/pulseaudio.h>
48 void reset()
override;
79 void onPulseContextFailed();
84 pa_sample_spec m_spec = {};
86 mutable timeval lastTimingInfo = {};
96 pa_stream *m_stream =
nullptr;
97 std::vector<char> m_audioBuffer;
99 qint64 m_totalTimeValue = 0;
100 qint64 m_elapsedTimeOffset = 0;
101 mutable qint64 averageLatency = 0;
102 mutable qint64 lastProcessedUSecs = 0;
103 qreal m_volume = 1.0;
108 std::atomic<pa_operation *> m_drainOperation =
nullptr;
109 int m_periodSize = 0;
110 int m_bufferSize = 0;
111 int m_periodTime = 0;
112 bool m_pullMode =
true;
113 bool m_opened =
false;
114 bool m_resuming =
false;
IOBluetoothDevice * device
qint64 writeData(const char *data, qint64 len) override
Writes up to maxSize bytes from data to the device.
virtual ~PulseOutputPrivate()
\inmodule QtCore \reentrant
QObject * parent() const
Returns a pointer to the parent object.
void streamDrainedCallback()
void streamUnderflowCallback()
QAudio::Error error() const override
qreal volume() const override
QIODevice * start() override
void setVolume(qreal volume) override
qint64 processedUSecs() const override
void setBufferSize(qsizetype value) override
QAudio::State state() const override
void setFormat(const QAudioFormat &format) override
void timerEvent(QTimerEvent *event) override
This event handler can be reimplemented in a subclass to receive timer events for the object.
QAudioFormat format() const override
qsizetype bytesFree() const override
qsizetype bufferSize() const 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
std::unique_ptr< pa_operation, PAOperationDeleter > PAOperationUPtr