12 #ifndef ROC_SNDIO_SNDFILE_SOURCE_H_
13 #define ROC_SNDIO_SNDFILE_SOURCE_H_
52 bool open(
const char* driver,
const char* path);
97 bool seek_(
size_t offset);
Sample specification. Describes sample rate and channels.
Base class for non-copyable objects.
virtual ISink * to_sink()
Cast IDevice to ISink.
virtual bool restart()
Restart reading from the beginning.
bool is_valid() const
Check if the object was successfully constructed.
virtual void reclock(core::nanoseconds_t timestamp)
Adjust source clock to match consumer clock.
virtual ISource * to_source()
Cast IDevice to ISink.
virtual audio::SampleSpec sample_spec() const
Get sample specification of the source.
virtual DeviceState state() const
Get device state.
virtual bool has_latency() const
Check if the source supports latency reports.
bool open(const char *driver, const char *path)
Open input file or device.
virtual bool resume()
Resume paused reading.
SndfileSource(core::IArena &arena, const Config &config)
Initialize.
virtual DeviceType type() const
Get device type.
virtual core::nanoseconds_t latency() const
Get latency of the source.
virtual bool read(audio::Frame &)
Read frame.
virtual bool has_clock() const
Check if the source has own clock.
virtual void pause()
Pause reading.
nanoseconds_t timestamp(clock_t clock)
Get current timestamp in nanoseconds.
int64_t nanoseconds_t
Nanoseconds.
Commonly used types and functions.
Various units used in packets.