Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::packet::DelayedReader Class Reference

Delayed reader. More...

#include <delayed_reader.h>

Inheritance diagram for roc::packet::DelayedReader:
Collaboration diagram for roc::packet::DelayedReader:

Public Member Functions

 DelayedReader (IReader &reader, core::nanoseconds_t target_delay, const audio::SampleSpec &sample_spec)
 Initialize. More...
 
bool is_valid () const
 Check if object was constructed successfully. More...
 
virtual ROC_ATTR_NODISCARD status::StatusCode read (PacketPtr &)
 Read packet. More...
 

Detailed Description

Delayed reader.

Remarks
Delays audio packet reader for given amount of samples.

Definition at line 28 of file delayed_reader.h.

Constructor & Destructor Documentation

◆ DelayedReader()

roc::packet::DelayedReader::DelayedReader ( IReader reader,
core::nanoseconds_t  target_delay,
const audio::SampleSpec sample_spec 
)

Initialize.

Parameters

  • reader is used to read packets
  • target_delay is the delay to insert before first packet
  • sample_spec is the specifications of incoming packets

Member Function Documentation

◆ is_valid()

bool roc::packet::DelayedReader::is_valid ( ) const

Check if object was constructed successfully.

◆ read()

virtual ROC_ATTR_NODISCARD status::StatusCode roc::packet::DelayedReader::read ( PacketPtr )
virtual

Read packet.

Implements roc::packet::IReader.


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