HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions
v1::audio_system Class Referenceabstract

#include <hikogui/audio/audio_system.hpp>

Inheritance diagram for v1::audio_system:
v1::audio_system_aggregate v1::audio_system_asio v1::audio_system_win32

Public Types

using notifier_type = notifier<>
 
using callback_token = notifier_type::callback_token
 
using callback_proto = notifier_type::callback_proto
 

Public Member Functions

 audio_system (audio_system const &)=delete
 
 audio_system (audio_system &&)=delete
 
audio_systemoperator= (audio_system const &)=delete
 
audio_systemoperator= (audio_system &&)=delete
 
virtual generator< audio_device & > devices () noexcept=0
 The devices that are part of the audio system.
 
callback_token subscribe (forward_of< callback_proto > auto &&func, callback_flags flags=callback_flags::synchronous) noexcept
 Subscribe a function to be called when the device list changes.
 
auto operator co_await () noexcept
 

Static Public Member Functions

static std::unique_ptr< audio_systemmake_unique () noexcept
 Create an audio system object specific for the current operating system.
 

Detailed Description

An system of audio devices. Systems are for example: Window Audio Session API (WASAPI), ASIO, Apple CoreAudio

Member Function Documentation

◆ devices()

virtual generator< audio_device & > v1::audio_system::devices ( )
pure virtualnoexcept

The devices that are part of the audio system.

Due to complicated threading and callback function interactions audio devices are not destroyed until application shutdown.

Returns
A generator-coroutine object that can be iterated over.

Implemented in v1::audio_system_aggregate, and v1::audio_system_win32.

◆ make_unique()

static std::unique_ptr< audio_system > v1::audio_system::make_unique ( )
staticnoexcept

Create an audio system object specific for the current operating system.

◆ subscribe()

callback_token v1::audio_system::subscribe ( forward_of< callback_proto > auto && func,
callback_flags flags = callback_flags::synchronous )
inlinenoexcept

Subscribe a function to be called when the device list changes.

Returns
A callback token, a RAII object which when destroyed removes the subscription.

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