|
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. | |
| bool | valid () const |
| Check if the object was successfully constructed. | |
| bool | open (const char *driver, const char *path) |
| Open input file or device. | |
| virtual audio::SampleSpec | sample_spec () const |
| Get sample specification of the source. | |
| virtual core::nanoseconds_t | latency () const |
| Get latency of the source. | |
| virtual bool | has_clock () const |
| Check if the source has own clock. | |
| virtual State | state () const |
| Get current source state. | |
| virtual void | pause () |
| Pause reading. | |
| virtual bool | resume () |
| Resume paused reading. | |
| virtual bool | restart () |
| Restart reading from the beginning. | |
| virtual void | reclock (packet::ntp_timestamp_t timestamp) |
| Adjust source clock to match consumer clock. | |
| virtual bool | read (audio::Frame &) |
| Read frame. | |
| virtual State | state () const =0 |
| Get current source state. | |
| virtual void | pause ()=0 |
| Pause reading. | |
| virtual bool | resume ()=0 |
| Resume paused reading. | |
| virtual bool | restart ()=0 |
| Restart reading from the beginning. | |
| virtual void | reclock (packet::ntp_timestamp_t timestamp)=0 |
| Adjust source clock to match consumer clock. | |
| virtual audio::SampleSpec | sample_spec () const =0 |
| Get sample specification of the terminal. | |
| virtual core::nanoseconds_t | latency () const =0 |
| Get latency of the terminal. | |
| virtual bool | has_clock () const =0 |
| Check if the terminal has own clock. | |
| virtual bool | read (Frame &frame)=0 |
| Read audio frame. | |
Public Member Functions inherited from roc::core::ListNode | |
| ListNodeData * | list_node_data () const |
| Get list node data. | |
Additional Inherited Members | |
Public Types inherited from roc::sndio::ISource | |
| enum | State { Playing , Idle , Paused } |
| Source state. More... | |
SoX source.
Definition at line 34 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::ITerminal.
|
virtual |
Get latency of the source.
Implements roc::sndio::ITerminal.
| bool roc::sndio::SoxSource::open | ( | const char * | driver, |
| const char * | path | ||
| ) |
Open input file or device.
Parameters
driver is input driver name;path is input file or device name, "-" for stdin.driver or path are NULL, defaults are used.
|
virtual |
Pause reading.
Implements roc::sndio::ISource.
|
virtual |
Read frame.
Implements roc::audio::IFrameReader.
|
virtual |
Adjust source clock to match consumer clock.
Implements roc::sndio::ISource.
|
virtual |
Restart reading from the beginning.
Implements roc::sndio::ISource.
|
virtual |
Resume paused reading.
Implements roc::sndio::ISource.
|
virtual |
Get sample specification of the source.
Implements roc::sndio::ITerminal.
|
virtual |
Get current source state.
Implements roc::sndio::ISource.
| bool roc::sndio::SoxSource::valid | ( | ) | const |
Check if the object was successfully constructed.