12 #ifndef ROC_SNDIO_SOX_SINK_H_
13 #define ROC_SNDIO_SOX_SINK_H_
52 bool open(
const char* driver,
const char* path);
92 bool open_(
const char* driver,
const char* path);
93 void write_(
const sox_sample_t* samples,
size_t n_samples);
96 sox_format_t* output_;
97 sox_signalinfo_t out_signal_;
Sample specification. Describes sample rate and channels.
Base class for non-copyable objects.
virtual bool resume()
Resume paused reading.
virtual audio::SampleSpec sample_spec() const
Get sample specification of the sink.
bool is_valid() const
Check if the object was successfully constructed.
virtual void write(audio::Frame &frame)
Write audio frame.
virtual ISource * to_source()
Cast IDevice to ISink.
virtual DeviceState state() const
Get device state.
virtual ISink * to_sink()
Cast IDevice to ISink.
bool open(const char *driver, const char *path)
Open output file or device.
virtual bool has_latency() const
Check if the sink supports latency reports.
virtual void pause()
Pause reading.
virtual bool restart()
Restart reading from the beginning.
virtual DeviceType type() const
Get device type.
virtual bool has_clock() const
Check if the sink has own clock.
virtual core::nanoseconds_t latency() const
Get latency of the sink.
SoxSink(core::IArena &arena, const Config &config, DriverType type)
Initialize.
int64_t nanoseconds_t
Nanoseconds.
Commonly used types and functions.
Various units used in packets.