Audaspace 1.5.0
A high level audio library.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
CoreAudioSynchronizer Class Reference

This class is a Synchronizer implementation using a CoreAudio clock. More...

#include <CoreAudioSynchronizer.h>

Inheritance diagram for CoreAudioSynchronizer:
Inheritance graph
[legend]

Public Member Functions

 CoreAudioSynchronizer (AudioUnit &audio_unit)
 Creates a new CoreAudioSynchronizer.
 
virtual void seek (std::shared_ptr< IHandle > handle, double time)
 Sets the playback position of a handle and the synchronizer to a specific time.
 
virtual double getPosition (std::shared_ptr< IHandle > handle)
 Retrieves the position of the synchronizer.
 
virtual void play ()
 Starts the synchronizer playback.
 
virtual void stop ()
 Stops the synchronizer playback.
 
virtual void setSyncCallback (syncFunction function, void *data)
 Sets the callback function that is called when a synchronization event happens.
 
virtual int isPlaying ()
 Retrieves whether the synchronizer is playing back.
 
- Public Member Functions inherited from ISynchronizer
virtual ~ISynchronizer ()
 Destroys the synchronizer.
 

Additional Inherited Members

- Public Types inherited from ISynchronizer
typedef void(* syncFunction) (void *, int, float)
 The syncFunction is called when a synchronization event happens.
 

Detailed Description

This class is a Synchronizer implementation using a CoreAudio clock.

Constructor & Destructor Documentation

◆ CoreAudioSynchronizer()

CoreAudioSynchronizer::CoreAudioSynchronizer ( AudioUnit & audio_unit)

Creates a new CoreAudioSynchronizer.

Parameters
deviceThe device that should be synchronized.

Member Function Documentation

◆ getPosition()

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

Retrieves the position of the synchronizer.

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

Implements ISynchronizer.

◆ isPlaying()

virtual int CoreAudioSynchronizer::isPlaying ( )
virtual

Retrieves whether the synchronizer is playing back.

Returns
Whether the synchronizer plays back.

Implements ISynchronizer.

◆ play()

virtual void CoreAudioSynchronizer::play ( )
virtual

Starts the synchronizer playback.

Implements ISynchronizer.

◆ seek()

virtual void CoreAudioSynchronizer::seek ( std::shared_ptr< IHandle > handle,
double time )
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.

Implements ISynchronizer.

◆ setSyncCallback()

virtual void CoreAudioSynchronizer::setSyncCallback ( syncFunction function,
void * data )
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.

Implements ISynchronizer.

◆ stop()

virtual void CoreAudioSynchronizer::stop ( )
virtual

Stops the synchronizer playback.

Implements ISynchronizer.


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