![]() |
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
SoX source. More...
#include <sox_source.h>
Public Member Functions | |
SoxSource (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 *input) |
Open input file or device. More... | |
virtual size_t | sample_rate () const |
Get sample rate of an input file or a device. More... | |
virtual bool | has_clock () const |
Check if the source has own clock. More... | |
virtual State | state () const |
Get current source state. More... | |
virtual void | wait_active () const |
Wait until the source state becomes active. More... | |
virtual bool | read (audio::Frame &) |
Read frame. More... | |
Additional Inherited Members | |
![]() | |
enum | State { Active, Inactive } |
Source state. More... | |
SoX source.
Definition at line 32 of file sox_source.h.
roc::sndio::SoxSource::SoxSource | ( | core::IAllocator & | allocator, |
const Config & | config | ||
) |
Initialize.
|
virtual |
Check if the source has own clock.
Implements roc::sndio::ISource.
bool roc::sndio::SoxSource::open | ( | const char * | driver, |
const char * | input | ||
) |
Open input file or device.
Parameters
driver
is input driver name;input
is input file or device name, "-" for stdin.driver
or input
are NULL, defaults are used.
|
virtual |
Read frame.
Implements roc::sndio::ISource.
|
virtual |
Get sample rate of an input file or a device.
Implements roc::sndio::ISource.
|
virtual |
Get current source state.
Implements roc::sndio::ISource.
bool roc::sndio::SoxSource::valid | ( | ) | const |
Check if the object was successfully constructed.
|
virtual |
Wait until the source state becomes active.
Implements roc::sndio::ISource.