Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::sndio::ISource Class Referenceabstract

Source interface. More...

#include <isource.h>

Inheritance diagram for roc::sndio::ISource:
Collaboration diagram for roc::sndio::ISource:

Public Member Functions

virtual void reclock (core::nanoseconds_t timestamp)=0
 Adjust source clock to match consumer clock. More...
- Public Member Functions inherited from roc::sndio::IDevice
virtual DeviceType type () const =0
 Get device type. More...
virtual DeviceState state () const =0
 Get device state. More...
virtual void pause ()=0
 Pause device. More...
virtual bool resume ()=0
 Resume device after pause. More...
virtual bool restart ()=0
 Restart device. More...
virtual audio::SampleSpec sample_spec () const =0
 Get sample specification of the device. More...
virtual core::nanoseconds_t latency () const =0
 Get latency of the device. More...
virtual bool has_latency () const =0
 Check if the device supports latency reports. More...
virtual bool has_clock () const =0
 Check if the device has own clock. More...
- Public Member Functions inherited from roc::audio::IFrameReader
virtual bool read (Frame &frame)=0
 Read audio frame. More...
- Public Member Functions inherited from roc::core::ListNode
ListNodeDatalist_node_data () const
 Get list node data. More...

Detailed Description

Source interface.

Definition at line 23 of file isource.h.

Member Function Documentation

◆ reclock()

virtual void roc::sndio::ISource::reclock ( core::nanoseconds_t  timestamp)
pure virtual

Adjust source clock to match consumer clock.

Invoked regularly after reading every or a several frames. timestamp defines the time in Unix domain when the last sample of the last frame read from source is going to be actually processed by consumer.

Implemented in roc::sndio::SoxSource, roc::sndio::PulseaudioSource, roc::pipeline::TranscoderSource, and roc::pipeline::ReceiverSource.

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