Audaspace
1.3.0
A high level audio library.
|
Go to the documentation of this file.
20 #define AUD_BUILD_PLUGIN
34 #include <condition_variable>
36 #include <jack/jack.h>
37 #include <jack/ringbuffer.h>
50 jack_port_t** m_ports;
55 jack_client_t* m_client;
67 jack_ringbuffer_t** m_ringbuffers;
81 AUD_LOCAL static void jack_shutdown(
void* data);
89 AUD_LOCAL static int jack_mix(jack_nframes_t length,
void* data);
91 AUD_LOCAL static int jack_sync(jack_transport_state_t state, jack_position_t* pos,
void* data);
96 jack_transport_state_t m_nextState;
101 jack_transport_state_t m_state;
116 void* m_syncFuncData;
121 std::thread m_mixingThread;
126 std::mutex m_mixingLock;
131 std::condition_variable m_mixingCondition;
void(* syncFunction)(void *, int, float)
The syncFunction is called when a synchronization event happens.
Definition: ISynchronizer.h:52
JackDevice(std::string name, DeviceSpecs specs, int buffersize=AUD_DEFAULT_BUFFER_SIZE)
Creates a JACK client for audio output.
virtual ~JackDevice()
Closes the JACK client.
void setSyncCallback(ISynchronizer::syncFunction sync, void *data)
Sets the sync callback for jack transport playback.
void stopPlayback()
Stops jack transport playback.
Specification of a sound device.
Definition: Specification.h:120
The JackSynchronizer class.
This device plays back through JACK.
Definition: JackDevice.h:45
#define AUD_DEFAULT_BUFFER_SIZE
The default playback buffer size of a device.
Definition: Audaspace.h:103
This class enables global synchronization of several audio applications if supported.
Definition: ISynchronizer.h:39
This class is a Synchronizer implementation using JACK Transport.
Definition: JackSynchronizer.h:39
virtual void playing(bool playing)
This function tells the device, to start or pause playback.
#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
static void registerPlugin()
Registers this plugin.
float getPlaybackPosition()
Retrieves the jack transport playback time.
void seekPlayback(float time)
Seeks jack transport playback.
void startPlayback()
Starts jack transport playback.
This class is a simple buffer in RAM which is 32 Byte aligned and provides resize functionality.
Definition: Buffer.h:34
bool doesPlayback()
Returns whether jack transport plays back.
#define AUD_NAMESPACE_END
Closes the audaspace namespace aud.
Definition: Audaspace.h:119
The SoftwareDevice class.
virtual ISynchronizer * getSynchronizer()
Retrieves the synchronizer for this device, which enables accurate synchronization between audio play...
#define AUD_NAMESPACE_BEGIN
Opens the audaspace namespace aud.
Definition: Audaspace.h:116
The software device is a generic device with software mixing.
Definition: SoftwareDevice.h:52