20 #define AUD_BUILD_PLUGIN 30 #include <condition_variable> 34 #include <jack/jack.h> 50 jack_port_t** m_ports;
55 jack_client_t* m_client;
66 AUD_LOCAL static void jack_shutdown(
void* data);
74 AUD_LOCAL static int jack_mix(jack_nframes_t length,
void* data);
76 AUD_LOCAL static int jack_sync(jack_transport_state_t state, jack_position_t* pos,
void* data);
81 jack_transport_state_t m_lastState;
86 jack_transport_state_t m_lastMixState;
91 std::atomic<float> m_syncTime;
96 std::atomic<int> m_syncCallRevision;
101 std::atomic<int> m_lastSyncCallRevision;
106 int m_rollingSyncRevision;
113 int m_lastRollingSyncRevision;
118 syncFunction m_syncFunc;
123 void* m_syncFuncData;
132 virtual void playing(
bool playing);
153 void playSynchronizer();
158 void stopSynchronizer();
164 void seekSynchronizer(
double time);
171 void setSyncCallback(syncFunction sync,
void* data);
177 double getSynchronizerPosition();
183 int isSynchronizerPlaying();
188 static void registerPlugin();
#define AUD_NAMESPACE_BEGIN
Opens the audaspace namespace aud.
Definition: Audaspace.h:116
virtual void playing(bool playing)
This function tells the device, to start or pause playback.
#define AUD_DEFAULT_BUFFER_SIZE
The default playback buffer size of a device.
Definition: Audaspace.h:103
This device plays back through JACK.
Definition: JackDevice.h:44
The MixingThreadDevice class.
This class is a simple buffer in RAM which is 32 Byte aligned and provides resize functionality...
Definition: Buffer.h:33
Specification of a sound device.
Definition: Specification.h:128
This device extends the SoftwareDevice with code for running mixing in a separate thread...
Definition: MixingThreadDevice.h:36
#define AUD_NAMESPACE_END
Closes the audaspace namespace aud.
Definition: Audaspace.h:119
#define AUD_PLUGIN_API
Used for exporting symbols in the shared library.
Definition: Audaspace.h:94
#define AUD_LOCAL
Used for hiding symbols from export in the shared library.
Definition: Audaspace.h:80
virtual void preMixingWork(bool playing)
Called every iteration in the mixing thread before mixing.