Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::sndio::SoxSink Class Reference

SoX sink. More...

#include <sox_sink.h>

Inheritance diagram for roc::sndio::SoxSink:
Collaboration diagram for roc::sndio::SoxSink:

Public Member Functions

 SoxSink (core::IArena &arena, const Config &config)
 Initialize. More...
 
bool is_valid () const
 Check if the object was successfully constructed. More...
 
bool open (const char *driver, const char *path)
 Open output file or device. More...
 
virtual DeviceType type () const
 Get device type. More...
 
virtual DeviceState state () const
 Get device state. More...
 
virtual void pause ()
 Pause reading. More...
 
virtual bool resume ()
 Resume paused reading. More...
 
virtual bool restart ()
 Restart reading from the beginning. More...
 
virtual audio::SampleSpec sample_spec () const
 Get sample specification of the sink. More...
 
virtual core::nanoseconds_t latency () const
 Get latency of the sink. More...
 
virtual bool has_latency () const
 Check if the sink supports latency reports. More...
 
virtual bool has_clock () const
 Check if the sink has own clock. More...
 
virtual void write (audio::Frame &frame)
 Write audio frame. More...
 
- Public Member Functions inherited from roc::core::ListNode
ListNodeDatalist_node_data () const
 Get list node data. More...
 

Detailed Description

SoX sink.

Remarks
Writes samples to output file or device. Supports multiple drivers for different file types and audio systems.

Definition at line 33 of file sox_sink.h.

Constructor & Destructor Documentation

◆ SoxSink()

roc::sndio::SoxSink::SoxSink ( core::IArena arena,
const Config config 
)

Initialize.

Member Function Documentation

◆ has_clock()

virtual bool roc::sndio::SoxSink::has_clock ( ) const
virtual

Check if the sink has own clock.

Implements roc::sndio::IDevice.

◆ has_latency()

virtual bool roc::sndio::SoxSink::has_latency ( ) const
virtual

Check if the sink supports latency reports.

Implements roc::sndio::IDevice.

◆ is_valid()

bool roc::sndio::SoxSink::is_valid ( ) const

Check if the object was successfully constructed.

◆ latency()

virtual core::nanoseconds_t roc::sndio::SoxSink::latency ( ) const
virtual

Get latency of the sink.

Implements roc::sndio::IDevice.

◆ open()

bool roc::sndio::SoxSink::open ( const char *  driver,
const char *  path 
)

Open output file or device.

Parameters

  • driver is output driver name;
  • path is output file or device name, "-" for stdout.
Remarks
If driver or path are NULL, defaults are used.

◆ pause()

virtual void roc::sndio::SoxSink::pause ( )
virtual

Pause reading.

Implements roc::sndio::IDevice.

◆ restart()

virtual bool roc::sndio::SoxSink::restart ( )
virtual

Restart reading from the beginning.

Implements roc::sndio::IDevice.

◆ resume()

virtual bool roc::sndio::SoxSink::resume ( )
virtual

Resume paused reading.

Implements roc::sndio::IDevice.

◆ sample_spec()

virtual audio::SampleSpec roc::sndio::SoxSink::sample_spec ( ) const
virtual

Get sample specification of the sink.

Implements roc::sndio::IDevice.

◆ state()

virtual DeviceState roc::sndio::SoxSink::state ( ) const
virtual

Get device state.

Implements roc::sndio::IDevice.

◆ type()

virtual DeviceType roc::sndio::SoxSink::type ( ) const
virtual

Get device type.

Implements roc::sndio::IDevice.

◆ write()

virtual void roc::sndio::SoxSink::write ( audio::Frame frame)
virtual

Write audio frame.

Implements roc::audio::IFrameWriter.


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