12 #ifndef ROC_SNDIO_IDEVICE_H_
13 #define ROC_SNDIO_IDEVICE_H_
Sample specification. Describes sample rate and channels.
Base interface for sinks and sources.
virtual audio::SampleSpec sample_spec() const =0
Get sample specification of the device.
virtual bool has_clock() const =0
Check if the device has own clock.
virtual void pause()=0
Pause device.
virtual bool restart()=0
Restart device.
virtual core::nanoseconds_t latency() const =0
Get latency of the device.
virtual ISource * to_source()=0
Cast IDevice to ISink.
virtual DeviceState state() const =0
Get device state.
virtual ISink * to_sink()=0
Cast IDevice to ISink.
virtual DeviceType type() const =0
Get device type.
virtual bool has_latency() const =0
Check if the device supports latency reports.
virtual bool resume()=0
Resume device after pause.
int64_t nanoseconds_t
Nanoseconds.
Commonly used types and functions.