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::IAllocator &allocator, const Config &config)
 Initialize. More...
bool valid () const
 Check if the object was successfully constructed. More...
bool open (const char *driver, const char *output)
 Open output file or device. More...
virtual size_t sample_rate () const
 Get sample rate of the sink. More...
virtual bool has_clock () const
 Check if the sink has own clock. More...
virtual void write (audio::Frame &frame)
 Write audio frame. More...

Detailed Description

SoX sink.

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

Definition at line 32 of file sox_sink.h.

Constructor & Destructor Documentation

roc::sndio::SoxSink::SoxSink ( core::IAllocator allocator,
const Config config 


Member Function Documentation

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

Check if the sink has own clock.

Implements roc::sndio::ISink.

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

Open output file or device.


  • driver is output driver name;
  • output is output file or device name, "-" for stdout.
If driver or output are NULL, defaults are used.
virtual size_t roc::sndio::SoxSink::sample_rate ( ) const

Get sample rate of the sink.

Implements roc::sndio::ISink.

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

Check if the object was successfully constructed.

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

Write audio frame.

Implements roc::audio::IWriter.

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