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

#include <hikogui/audio/audio_system.hpp>

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

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.
 
template<forward_of< void()> Func>
callback< void()> subscribe (Func &&func, callback_flags flags=callback_flags::synchronous) noexcept
 Subscribe a function to be called when the device list changes.
 
auto operator co_await () const noexcept
 

Static Public Member Functions

static audio_systemglobal () 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 & > hi::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 hi::v1::audio_system_aggregate, and hi::v1::audio_system_win32.

◆ global()

hi_export audio_system & hi::v1::audio_system::global ( )
inlinestaticnoexcept

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

◆ subscribe()

template<forward_of< void()> Func>
callback< void()> hi::v1::audio_system::subscribe ( Func && 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 files: