HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
tt::audio_device Class Referenceabstract

#include <ttauri/audio/audio_device.hpp>

Inheritance diagram for tt::audio_device:
tt::audio_device_asio tt::audio_device_win32

Public Member Functions

virtual std::string name () const noexcept=0
 Get a user friendly name of the audio device.
 
virtual label label () const noexcept=0
 Get a user friendly label of the audio device.
 
virtual audio_device_state state () const noexcept=0
 Get the current state of the audio device.
 
virtual audio_direction direction () const noexcept=0
 
virtual bool exclusive () const noexcept=0
 Check if the device is in exclusive mode.
 
virtual void set_exclusive (bool exclusive) noexcept=0
 Set the device in exclusive or shared mode.
 
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 tt::speaker_mapping input_speaker_mapping () const noexcept=0
 Get the currently configured input speaker mapping.
 
virtual void set_input_speaker_mapping (tt::speaker_mapping speaker_mapping) noexcept=0
 Set the input speaker mapping.
 
virtual std::vector< tt::speaker_mapping > available_input_speaker_mappings () const noexcept=0
 Speaker mapping that are available in the current configuration.
 
virtual tt::speaker_mapping output_speaker_mapping () const noexcept=0
 Get the currently configured output speaker mapping.
 
virtual void set_output_speaker_mapping (tt::speaker_mapping speaker_mapping) noexcept=0
 Set the output speaker mapping.
 
virtual std::vector< tt::speaker_mapping > available_output_speaker_mappings () const noexcept=0
 Speaker mapping that are available in the current configuration.
 

Data Fields

audio_device_id id
 The nonephemeral unique id that for an audio device on the system.
 

Detailed Description

A set of audio channels which can be rendered and/or captures at the same time.

On win32 this would be Audio Endpoint gfx_device, which can either render or capture but not at the same time.

On MacOS this would contain all the inputs and outputs of either a physical or aggregate device that can run in the same clock domain, with both render and capture at the same time.

Member Function Documentation

◆ available_input_speaker_mappings()

virtual std::vector< tt::speaker_mapping > tt::audio_device::available_input_speaker_mappings ( ) const
pure virtualnoexcept

Speaker mapping that are available in the current configuration.

Returns
A list of speaker mappings.

Implemented in tt::audio_device_win32.

◆ available_output_speaker_mappings()

virtual std::vector< tt::speaker_mapping > tt::audio_device::available_output_speaker_mappings ( ) const
pure virtualnoexcept

Speaker mapping that are available in the current configuration.

Returns
A list of speaker mappings.

Implemented in tt::audio_device_win32.

◆ exclusive()

virtual bool tt::audio_device::exclusive ( ) const
pure virtualnoexcept

Check if the device is in exclusive mode.

Returns
True to if exclusive mode, False if shared mode

Implemented in tt::audio_device_win32.

◆ input_speaker_mapping()

virtual tt::speaker_mapping tt::audio_device::input_speaker_mapping ( ) const
pure virtualnoexcept

Get the currently configured input speaker mapping.

Returns
The current configured input speaker mapping.

Implemented in tt::audio_device_win32.

◆ label()

virtual label tt::audio_device::label ( ) const
pure virtualnoexcept

Get a user friendly label of the audio device.

This is a combination of the name of the device and the name of the end-point, plus an icon for the driver architecture.

Implemented in tt::audio_device_win32.

◆ name()

virtual std::string tt::audio_device::name ( ) const
pure virtualnoexcept

Get a user friendly name of the audio device.

This is a combination of the name of the device and the name of the end-point.

Implemented in tt::audio_device_win32.

◆ output_speaker_mapping()

virtual tt::speaker_mapping tt::audio_device::output_speaker_mapping ( ) const
pure virtualnoexcept

Get the currently configured output speaker mapping.

Returns
The current configured output speaker mapping.

Implemented in tt::audio_device_win32.

◆ sample_rate()

virtual double tt::audio_device::sample_rate ( ) const
pure virtualnoexcept

Get the currently configured sample rate.

Returns
The current sample rate, or 0.0f when the sample rate is not configured.

Implemented in tt::audio_device_win32.

◆ set_exclusive()

virtual void tt::audio_device::set_exclusive ( bool exclusive)
pure virtualnoexcept

Set the device in exclusive or shared mode.

In shared mode:

  • The sample rate is the same as the operating system's mixer.
  • The speaker mapping is the same as the operating system's mixer.

In exclusive mode:

  • The sample rate can be changed, and the physical audio device will be configured to it.
  • The speaker mapping can be changed, and the physical device will configure its input and outputs accordingly.
Parameters
exclusiveTrue to get exclusive mode, False to get shared mode.

Implemented in tt::audio_device_win32.

◆ set_input_speaker_mapping()

virtual void tt::audio_device::set_input_speaker_mapping ( tt::speaker_mapping speaker_mapping)
pure virtualnoexcept

Set the input speaker mapping.

Parameters
speaker_mappingThe input speaker mapping to configure the device to.

Implemented in tt::audio_device_win32.

◆ set_output_speaker_mapping()

virtual void tt::audio_device::set_output_speaker_mapping ( tt::speaker_mapping speaker_mapping)
pure virtualnoexcept

Set the output speaker mapping.

Parameters
speaker_mappingThe output speaker mapping to configure the device to.

Implemented in tt::audio_device_win32.

◆ set_sample_rate()

virtual void tt::audio_device::set_sample_rate ( double sample_rate)
pure virtualnoexcept

Set the sample rate.

Parameters
sample_rateThe sample rate to configure the device to.

Implemented in tt::audio_device_win32.

◆ state()

virtual audio_device_state tt::audio_device::state ( ) const
pure virtualnoexcept

Get the current state of the audio device.

Implemented in tt::audio_device_win32.

Field Documentation

◆ id

audio_device_id tt::audio_device::id

The nonephemeral unique id that for an audio device on the system.


The documentation for this class was generated from the following file: