struct CCL::IAudioTransport

Overview

A shared transport instance to control playback/recording of one or more clients. More…

#include <iaudiotransport.h>

struct IAudioTransport: public CCL::IAudioTransportClock
{
    // methods

    virtual tbool CCL_API isActive () const = 0;
    virtual tresult CCL_API start () = 0;
    virtual tresult CCL_API stop () = 0;
    virtual tbool CCL_API isPlaying () const = 0;
    virtual tresult CCL_API seek (TSeconds time) = 0;
    virtual tresult CCL_API setSeekOverride (tbool state) = 0;
    virtual tbool CCL_API isSeekOverride () const = 0;
    virtual tresult CCL_API setRecordActive (tbool state) = 0;
    virtual tbool CCL_API isRecording () const = 0;
    virtual tresult CCL_API addClient (IAudioTransportClient* client) = 0;
    virtual tresult CCL_API removeClient (IAudioTransportClient* client) = 0;
    virtual tresult CCL_API addObserver (IAudioTransportObserver* observer) = 0;
    virtual tresult CCL_API removeObserver (IAudioTransportObserver* observer) = 0;
    IAudioTransport tresult rewind ();
};

Inherited Members

public:
    // fields

    static constexpr TSeconds kMaxDurationUnbound = -1.;

    // methods

    virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0;
    virtual unsigned int CCL_API retain () = 0;
    virtual unsigned int CCL_API release () = 0;
    virtual TSeconds CCL_API getCurrentTime () const = 0;
    virtual TSeconds CCL_API getMaxDuration () const = 0;

Detailed Documentation

A shared transport instance to control playback/recording of one or more clients.

It provides updates to observers for state and time changes.

Threading Policy: Everything happens on the main thread.

Methods

virtual tbool CCL_API isActive () const = 0

Check if this transport instance is currently active.

virtual tresult CCL_API start () = 0

Start playback for all clients.

virtual tresult CCL_API stop () = 0

Stop playback for all clients.

virtual tbool CCL_API isPlaying () const = 0

Returns true if any clients are playing.

virtual tresult CCL_API seek (TSeconds time) = 0

Seek all clients to given position.

virtual tresult CCL_API setSeekOverride (tbool state) = 0

Enables seek override so that seeking only changes the displayed time.

virtual tbool CCL_API isSeekOverride () const = 0

Check if seek override is currently active.

virtual tresult CCL_API setRecordActive (tbool state) = 0

Start/stop recording for all clients.

virtual tbool CCL_API isRecording () const = 0

Returns true if any clients are recording.

virtual tresult CCL_API addClient (IAudioTransportClient* client) = 0

Add client to sync to this transport instance (not retained).

virtual tresult CCL_API removeClient (IAudioTransportClient* client) = 0

Remove client.

virtual tresult CCL_API addObserver (IAudioTransportObserver* observer) = 0

Add observer to get state/time notifications (not retained).

virtual tresult CCL_API removeObserver (IAudioTransportObserver* observer) = 0

Remove observer.

IAudioTransport tresult rewind ()

Shortcut to rewind to zero.