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