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