Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
roc::pipeline::ConverterSource Class Reference

Converter source pipeline. More...

#include <converter_source.h>

Inheritance diagram for roc::pipeline::ConverterSource:
roc::sndio::ISource roc::core::NonCopyable< T > roc::sndio::ITerminal roc::audio::IFrameReader roc::core::ListNode roc::core::NonCopyable< ListNode >

Public Member Functions

 ConverterSource (const ConverterConfig &config, sndio::ISource &input_source, core::BufferFactory< audio::sample_t > &buffer_factory, core::IAllocator &allocator)
 Initialize.
 
bool valid ()
 Check if the pipeline was successfully constructed.
 
virtual audio::SampleSpec sample_spec () const
 Get sample specification of the source.
 
virtual core::nanoseconds_t latency () const
 Get latency of the source.
 
virtual bool has_clock () const
 Check if the sink has own clock.
 
virtual State state () const
 Get current source state.
 
virtual void pause ()
 Pause reading.
 
virtual bool resume ()
 Resume paused reading.
 
virtual bool restart ()
 Restart reading from the beginning.
 
virtual void reclock (packet::ntp_timestamp_t timestamp)
 Adjust source clock to match consumer clock.
 
virtual bool read (audio::Frame &)
 Read frame.
 
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.
 
- Public Member Functions inherited from roc::core::ListNode
ListNodeDatalist_node_data () const
 Get list node data.
 

Additional Inherited Members

- Public Types inherited from roc::sndio::ISource
enum  State { Playing , Idle , Paused }
 Source state. More...
 

Detailed Description

Converter source pipeline.

Remarks
  • input: frames
  • output: frames

Definition at line 35 of file converter_source.h.

Constructor & Destructor Documentation

◆ ConverterSource()

roc::pipeline::ConverterSource::ConverterSource ( const ConverterConfig config,
sndio::ISource input_source,
core::BufferFactory< audio::sample_t > &  buffer_factory,
core::IAllocator allocator 
)

Initialize.

Member Function Documentation

◆ has_clock()

virtual bool roc::pipeline::ConverterSource::has_clock ( ) const
virtual

Check if the sink has own clock.

Implements roc::sndio::ITerminal.

◆ latency()

virtual core::nanoseconds_t roc::pipeline::ConverterSource::latency ( ) const
virtual

Get latency of the source.

Implements roc::sndio::ITerminal.

◆ pause()

virtual void roc::pipeline::ConverterSource::pause ( )
virtual

Pause reading.

Implements roc::sndio::ISource.

◆ read()

virtual bool roc::pipeline::ConverterSource::read ( audio::Frame )
virtual

Read frame.

Implements roc::audio::IFrameReader.

◆ reclock()

virtual void roc::pipeline::ConverterSource::reclock ( packet::ntp_timestamp_t  timestamp)
virtual

Adjust source clock to match consumer clock.

Implements roc::sndio::ISource.

◆ restart()

virtual bool roc::pipeline::ConverterSource::restart ( )
virtual

Restart reading from the beginning.

Implements roc::sndio::ISource.

◆ resume()

virtual bool roc::pipeline::ConverterSource::resume ( )
virtual

Resume paused reading.

Implements roc::sndio::ISource.

◆ sample_spec()

virtual audio::SampleSpec roc::pipeline::ConverterSource::sample_spec ( ) const
virtual

Get sample specification of the source.

Implements roc::sndio::ITerminal.

◆ state()

virtual State roc::pipeline::ConverterSource::state ( ) const
virtual

Get current source state.

Implements roc::sndio::ISource.

◆ valid()

bool roc::pipeline::ConverterSource::valid ( )

Check if the pipeline was successfully constructed.


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