Audaspace 1.5.0
A high level audio library.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
ISynchronizer Interface Referenceabstract

This class enables global synchronization of several audio applications if supported. More...

#include <ISynchronizer.h>

Inheritance diagram for ISynchronizer:
Inheritance graph
[legend]

Public Types

typedef void(* syncFunction) (void *, int, float)
 The syncFunction is called when a synchronization event happens.
 

Public Member Functions

virtual ~ISynchronizer ()
 Destroys the synchronizer.
 
virtual void seek (std::shared_ptr< IHandle > handle, double time)=0
 Sets the playback position of a handle and the synchronizer to a specific time.
 
virtual double getPosition (std::shared_ptr< IHandle > handle)=0
 Retrieves the position of the synchronizer.
 
virtual void play ()=0
 Starts the synchronizer playback.
 
virtual void stop ()=0
 Stops the synchronizer playback.
 
virtual void setSyncCallback (syncFunction function, void *data)=0
 Sets the callback function that is called when a synchronization event happens.
 
virtual int isPlaying ()=0
 Retrieves whether the synchronizer is playing back.
 

Detailed Description

This class enables global synchronization of several audio applications if supported.

JACK for example supports synchronization through JACK Transport.

Member Typedef Documentation

◆ syncFunction

typedef void(* ISynchronizer::syncFunction) (void *, int, float)

The syncFunction is called when a synchronization event happens.

The function awaits three parameters. The first one is a user defined pointer, the second informs about whether playback is on and the third is the current playback time in seconds.

Member Function Documentation

◆ getPosition()

virtual double ISynchronizer::getPosition ( std::shared_ptr< IHandle > handle)
pure virtual

Retrieves the position of the synchronizer.

Parameters
handleThe handle which is synchronized.
Returns
The position in seconds.

Implemented in DefaultSynchronizer, CoreAudioSynchronizer, and JackSynchronizer.

◆ isPlaying()

virtual int ISynchronizer::isPlaying ( )
pure virtual

Retrieves whether the synchronizer is playing back.

Returns
Whether the synchronizer plays back.

Implemented in DefaultSynchronizer, CoreAudioSynchronizer, and JackSynchronizer.

◆ play()

virtual void ISynchronizer::play ( )
pure virtual

Starts the synchronizer playback.

Implemented in DefaultSynchronizer, CoreAudioSynchronizer, and JackSynchronizer.

◆ seek()

virtual void ISynchronizer::seek ( std::shared_ptr< IHandle > handle,
double time )
pure virtual

Sets the playback position of a handle and the synchronizer to a specific time.

Parameters
handleThe handle that should be synchronized/seeked.
timeThe absolute time to synchronize to.

Implemented in DefaultSynchronizer, CoreAudioSynchronizer, and JackSynchronizer.

◆ setSyncCallback()

virtual void ISynchronizer::setSyncCallback ( syncFunction function,
void * data )
pure virtual

Sets the callback function that is called when a synchronization event happens.

Parameters
functionThe function to be called.
dataUser data to be passed to the callback.

Implemented in DefaultSynchronizer, CoreAudioSynchronizer, and JackSynchronizer.

◆ stop()

virtual void ISynchronizer::stop ( )
pure virtual

Stops the synchronizer playback.

Implemented in DefaultSynchronizer, CoreAudioSynchronizer, and JackSynchronizer.


The documentation for this interface was generated from the following file: