![]() |
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Source interface. More...
#include <isource.h>
Public Types | |
enum | State { Playing , Idle , Paused } |
Source state. More... | |
Public Member Functions | |
virtual State | state () const =0 |
Get current source state. | |
virtual void | pause ()=0 |
Pause reading. | |
virtual bool | resume ()=0 |
Resume paused reading. | |
virtual bool | restart ()=0 |
Restart reading from the beginning. | |
virtual void | reclock (packet::ntp_timestamp_t timestamp)=0 |
Adjust source clock to match consumer clock. | |
![]() | |
virtual audio::SampleSpec | sample_spec () const =0 |
Get sample specification of the terminal. | |
virtual core::nanoseconds_t | latency () const =0 |
Get latency of the terminal. | |
virtual bool | has_clock () const =0 |
Check if the terminal has own clock. | |
![]() | |
virtual bool | read (Frame &frame)=0 |
Read audio frame. | |
![]() | |
ListNodeData * | list_node_data () const |
Get list node data. | |
|
pure virtual |
Pause reading.
Implemented in roc::pipeline::ConverterSource, roc::pipeline::ReceiverSource, and roc::sndio::SoxSource.
|
pure virtual |
Adjust source clock to match consumer clock.
timestamp
defines the time in NTP domain when the last sample of the last frame read from source is going to be actually processed by consumer. Implemented in roc::pipeline::ConverterSource, roc::pipeline::ReceiverSource, and roc::sndio::SoxSource.
|
pure virtual |
Restart reading from the beginning.
Implemented in roc::pipeline::ConverterSource, roc::pipeline::ReceiverSource, and roc::sndio::SoxSource.
|
pure virtual |
Resume paused reading.
Implemented in roc::pipeline::ConverterSource, roc::pipeline::ReceiverSource, and roc::sndio::SoxSource.
|
pure virtual |
Get current source state.
Implemented in roc::pipeline::ConverterSource, roc::pipeline::ReceiverSource, and roc::sndio::SoxSource.