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

Base interface for sinks and sources. More...

#include <idevice.h>

Inheritance diagram for roc::sndio::IDevice:

Public Member Functions

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...
 

Detailed Description

Base interface for sinks and sources.

Definition at line 25 of file idevice.h.

Member Function Documentation

◆ has_clock()

◆ has_latency()

virtual bool roc::sndio::IDevice::has_latency ( ) const
pure virtual

◆ latency()

◆ pause()

◆ restart()

virtual bool roc::sndio::IDevice::restart ( )
pure virtual

Restart device.

Remarks
If device was paused, it's automatically resumed.
Returns
false if an error occured.

Implemented in roc::sndio::SoxSource, roc::sndio::SoxSink, roc::sndio::PulseaudioSource, roc::sndio::PulseaudioSink, roc::pipeline::TranscoderSource, roc::pipeline::TranscoderSink, roc::pipeline::SenderSink, and roc::pipeline::ReceiverSource.

◆ resume()

virtual bool roc::sndio::IDevice::resume ( )
pure virtual

◆ sample_spec()

◆ state()

◆ type()


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