7#include "../bigint.hpp"
8#include "audio_device_delegate.hpp"
9#include "audio_stream_config.hpp"
10#include "audio_channel.hpp"
11#include "audio_direction.hpp"
12#include "audio_device_state.hpp"
13#include "speaker_mapping.hpp"
15#include "../utility/module.hpp"
21namespace hi::inline
v1 {
33 audio_device()
noexcept =
default;
34 virtual ~audio_device() =
default;
67 [[nodiscard]] virtual audio_device_state
state() const noexcept = 0;
69 [[nodiscard]] virtual audio_direction direction() const noexcept = 0;
75 [[nodiscard]] virtual
bool exclusive() const noexcept = 0;
98 [[nodiscard]] virtual
double sample_rate() const noexcept = 0;
#define hi_axiom(expression,...)
Specify an axiom; an expression that is true.
Definition assert.hpp:253
Functionality for labels, text and icons.
DOXYGEN BUG.
Definition algorithm.hpp:13
geometry/margins.hpp
Definition cache.hpp:11
virtual audio_device_state state() const noexcept=0
Get the current state of the audio device.
virtual hi::speaker_mapping input_speaker_mapping() const noexcept=0
Get the currently configured input speaker mapping.
virtual std::vector< hi::speaker_mapping > available_output_speaker_mappings() const noexcept=0
Speaker mapping that are available in the current configuration.
virtual void set_output_speaker_mapping(hi::speaker_mapping speaker_mapping) noexcept=0
Set the output speaker mapping.
virtual void set_input_speaker_mapping(hi::speaker_mapping speaker_mapping) noexcept=0
Set the input speaker mapping.
virtual void update_state() noexcept=0
Update the internal state based on the audio device.
std::string name() const noexcept
Get a user friendly name of the audio device.
Definition audio_device.hpp:47
virtual double sample_rate() const noexcept=0
Get the currently configured sample rate.
virtual void set_sample_rate(double sample_rate) noexcept=0
Set the sample rate.
virtual void set_exclusive(bool exclusive) noexcept=0
Set the device in exclusive or shared mode.
virtual hi::speaker_mapping output_speaker_mapping() const noexcept=0
Get the currently configured output speaker mapping.
std::string const & id() const noexcept
The nonephemeral unique id that for an audio device on the system.
Definition audio_device.hpp:38
virtual label label() const noexcept=0
Get a user friendly label of the audio device.
virtual std::vector< hi::speaker_mapping > available_input_speaker_mappings() const noexcept=0
Speaker mapping that are available in the current configuration.
virtual bool exclusive() const noexcept=0
Check if the device is in exclusive mode.
static hi_no_inline loop & main() noexcept
Get or create the main-loop.
Definition loop.hpp:137