12 #ifndef ROC_SNDIO_SOX_SOURCE_H_
13 #define ROC_SNDIO_SOX_SOURCE_H_
53 bool open(
const char* driver,
const char* path);
95 bool setup_names_(
const char* driver,
const char* path);
101 bool seek_(uint64_t offset);
111 sox_format_t* input_;
112 sox_signalinfo_t in_signal_;
Sample specification. Describes sample rate and channels.
Base class for non-copyable objects.
bool open(const char *driver, const char *path)
Open input file or device.
virtual void pause()
Pause reading.
virtual DeviceType type() const
Get device type.
virtual DeviceState state() const
Get device state.
SoxSource(core::IArena &arena, const Config &config, DriverType type)
Initialize.
bool is_valid() const
Check if the object was successfully constructed.
virtual bool has_clock() const
Check if the source has own clock.
virtual ISource * to_source()
Cast IDevice to ISink.
virtual bool restart()
Restart reading from the beginning.
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 read(audio::Frame &)
Read frame.
virtual bool has_latency() const
Check if the source supports latency reports.
virtual void reclock(core::nanoseconds_t timestamp)
Adjust source clock to match consumer clock.
virtual bool resume()
Resume paused reading.
virtual ISink * to_sink()
Cast IDevice to ISink.
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.