25#include <condition_variable>
42 volatile bool m_playback{
false};
62 std::thread m_mixingThread;
67 std::mutex m_mixingLock;
72 std::condition_variable m_mixingCondition;
80 MixingThreadDevice(
const MixingThreadDevice&) =
delete;
81 MixingThreadDevice& operator=(
const MixingThreadDevice&) =
delete;
#define AUD_NAMESPACE_END
Closes the audaspace namespace aud.
Definition Audaspace.h:119
#define AUD_LOCAL
Used for hiding symbols from export in the shared library.
Definition Audaspace.h:80
#define AUD_NAMESPACE_BEGIN
Opens the audaspace namespace aud.
Definition Audaspace.h:116
#define AUD_PLUGIN_API
Used for exporting symbols in the shared library.
Definition Audaspace.h:94
The SoftwareDevice class.
This class is a simple buffer in RAM which is 32 Byte aligned and provides resize functionality.
Definition Buffer.h:34
bool isMixingThreadRunning()
Returns whether the thread is running or not.
Definition MixingThreadDevice.h:106
void notifyMixingThread()
Notify the mixing thread.
virtual void playing(bool playing)
This function tells the device, to start or pause playback.
virtual void preMixingWork(bool playing)
Called every iteration in the mixing thread before mixing.
MixingThreadDevice()
Empty default constructor.
void startMixingThread(size_t buffersize)
Starts the streaming thread.
void stopMixingThread()
Stops all playback and notifies the mixing thread to stop.
RingBuffer & getRingBuffer()
Get ring buffer for reading.
Definition MixingThreadDevice.h:98
This class is a simple ring buffer in RAM which is 32 Byte aligned and provides functionality for con...
Definition RingBuffer.h:37
SoftwareDevice()
Empty default constructor.