4#ifndef QAUDIOENGINE_THREADED_P_H
5#define QAUDIOENGINE_THREADED_P_H
18#include <QtSpatialAudio/private/qtspatialaudioglobal_p.h>
19#include <QtSpatialAudio/private/qaudioengine_p.h>
20#include <QtCore/qmutex.h>
21#include <QtCore/qthread.h>
22#include <QtMultimedia/qaudiodevice.h>
74 bool m_roomEffectsEnabled =
true;
77 QAudioDevice m_device;
78 QAtomicInteger<
bool> m_paused =
false;
81 std::unique_ptr<QAudioOutputStream> outputStream;
83 QList<QSpatialSound *> sources;
84 QList<QAmbientSound *> stereoSources;
85 QList<QAudioRoom *> rooms;
86 mutable bool listenerPositionDirty =
true;
87 QAudioRoom *m_currentRoom =
nullptr;
void setOutputMode(QAudioEngine::OutputMode) override
void addRoom(QAudioRoom *room) override
static QAudioEngineThreaded * get(QAudioEngine *engine)
QAudioDevice outputDevice() const override
void setListenerPosition(std::optional< QVector3D > pos) override
void addSpatialSound(QSpatialSound *sound) override
QAudioEngine::OutputMode outputMode() const override
void addStereoSound(QAmbientSound *sound) override
void setPaused(bool paused) override
void setOutputDevice(const QAudioDevice &device) override
QAudioEngineThreaded(int sampleRate)
bool isPaused() const override
void setRoomEffectsEnabled(bool) override
void removeSpatialSound(QSpatialSound *sound) override
bool roomEffectsEnabled() const override
Returns true if room effects are enabled.
void removeStereoSound(QAmbientSound *sound) override
void removeRoom(QAudioRoom *room) override
QAudioRoom * currentRoom() const override
void setPaused(bool paused)
qint64 readData(char *data, qint64 len) override
Reads up to maxSize bytes from the device into data, and returns the number of bytes read or -1 if an...
bool atEnd() const override
Returns true if the current read and write position is at the end of the device (i....
~QAudioOutputStream() override
qint64 pos() const override
For random-access devices, this function returns the position that data is written to or read from.
QAudioOutputStream(QAudioEngineThreaded *d)
bool isSequential() const override
Returns true if this device is sequential; otherwise returns false.
qint64 bytesAvailable() const override
Returns the number of bytes that are available for reading.
qint64 writeData(const char *, qint64) override
Writes up to maxSize bytes from data to the device.
qint64 size() const override
For open random-access devices, this function returns the size of the device.
QT_BEGIN_NAMESPACE const int bufferTimeMs