![]() |
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Sndfile source. More...
#include <sndfile_source.h>
Public Member Functions | |
SndfileSource (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 input file or device. More... | |
virtual ISink * | to_sink () |
Cast IDevice to ISink. More... | |
virtual ISource * | to_source () |
Cast IDevice to ISink. 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 source. More... | |
virtual core::nanoseconds_t | latency () const |
Get latency of the source. More... | |
virtual bool | has_latency () const |
Check if the source supports latency reports. More... | |
virtual bool | has_clock () const |
Check if the source has own clock. More... | |
virtual void | reclock (core::nanoseconds_t timestamp) |
Adjust source clock to match consumer clock. More... | |
virtual bool | read (audio::Frame &) |
Read frame. More... | |
![]() | |
ListData * | list_data () const |
Get pointer to internal data. More... | |
Additional Inherited Members | |
![]() | |
static ListNode * | list_node (ListData *data) |
Get pointer to parent node from pointer to internal data. More... | |
Sndfile source.
Definition at line 34 of file sndfile_source.h.
roc::sndio::SndfileSource::SndfileSource | ( | core::IArena & | arena, |
const Config & | config | ||
) |
Initialize.
|
virtual |
Check if the source has own clock.
Implements roc::sndio::IDevice.
|
virtual |
Check if the source supports latency reports.
Implements roc::sndio::IDevice.
bool roc::sndio::SndfileSource::is_valid | ( | ) | const |
Check if the object was successfully constructed.
|
virtual |
Get latency of the source.
Implements roc::sndio::IDevice.
bool roc::sndio::SndfileSource::open | ( | const char * | driver, |
const char * | path | ||
) |
Open input file or device.
Parameters
driver
is input format name;path
is input file name, "-" for stdin.driver
is NULL, default is used.
|
virtual |
Pause reading.
Implements roc::sndio::IDevice.
|
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::IDevice.
|
virtual |
Resume paused reading.
Implements roc::sndio::IDevice.
|
virtual |
Get sample specification of the source.
Implements roc::sndio::IDevice.
|
virtual |
Get device state.
Implements roc::sndio::IDevice.
|
virtual |
Implements roc::sndio::IDevice.
|
virtual |
Implements roc::sndio::IDevice.
|
virtual |
Get device type.
Implements roc::sndio::IDevice.