15#ifndef QAUDIOOUTPUTALSA_H
16#define QAUDIOOUTPUTALSA_H
18#include <alsa/asoundlib.h>
20#include <QtCore/qfile.h>
21#include <QtCore/qdebug.h>
22#include <QtCore/qtimer.h>
23#include <QtCore/qstring.h>
24#include <QtCore/qstringlist.h>
25#include <QtCore/qelapsedtimer.h>
26#include <QtCore/qiodevice.h>
28#include <QtMultimedia/qaudio.h>
29#include <QtMultimedia/qaudiodevice.h>
30#include <private/qaudiosystem_p.h>
47 void reset()
override;
78 bool resuming =
false;
82 unsigned int buffer_time = 100000;
83 unsigned int period_time = 20000;
84 snd_pcm_uframes_t buffer_frames;
85 snd_pcm_uframes_t period_frames;
86 int xrun_recovery(
int err);
94 int bytesAvailable = 0;
95 qint64 elapsedTimeOffset = 0;
96 char* audioBuffer =
nullptr;
97 snd_pcm_t*
handle =
nullptr;
98 snd_pcm_access_t
access = SND_PCM_ACCESS_RW_INTERLEAVED;
99 snd_pcm_format_t pcmformat = SND_PCM_FORMAT_S16;
100 snd_pcm_hw_params_t *hwparams =
nullptr;
101 qreal m_volume = 1.0f;
IOBluetoothDevice * device
qint64 writeData(const char *data, qint64 len) override
Writes up to maxSize bytes from data to the device.
QIODevice * start() override
void setBufferSize(qsizetype value) override
QAudio::State suspendedInState
QAlsaAudioSink(const QByteArray &device, QObject *parent)
qint64 processedUSecs() const override
void setFormat(const QAudioFormat &fmt) override
void setVolume(qreal) override
QAudio::State deviceState
QAudio::State state() const override
qreal volume() const override
qsizetype bytesFree() const override
QAudioFormat format() const override
qsizetype bufferSize() const override
QAudio::Error error() const override
qint64 write(const char *data, qint64 len)
\inmodule QtCore \reentrant
QObject * parent() const
Returns a pointer to the parent object.
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]
GLuint64 GLenum void * handle
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
QVideoFrameFormat::PixelFormat fmt