7#include "audio_device.hpp"
8#include "../utility/module.hpp"
9#include "../generator.hpp"
13namespace hi::inline
v1 {
21 using callback_token = notifier_type::callback_token;
22 using callback_proto = notifier_type::callback_proto;
28 audio_system() = default;
29 virtual ~audio_system() = default;
30 audio_system(audio_system const&) = delete;
31 audio_system(audio_system&&) = delete;
32 audio_system& operator=(audio_system const&) = delete;
33 audio_system& operator=(audio_system&&) = delete;
50 return _notifier.subscribe(
hi_forward(func), flags);
53 auto operator co_await()
noexcept
55 return _notifier.operator
co_await();
59 notifier_type _notifier;
#define hi_forward(x)
Forward a value, based on the decltype of the value.
Definition utility.hpp:29
DOXYGEN BUG.
Definition algorithm.hpp:13
callback_flags
Definition callback_flags.hpp:11
A set of audio channels which can be rendered and/or captures at the same time.
Definition audio_device.hpp:31
virtual generator< audio_device & > devices() noexcept=0
The devices that are part of the audio system.
static std::unique_ptr< audio_system > make_unique() noexcept
Create an audio system object specific for the current operating 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.
Definition audio_system.hpp:48
A return value for a generator-function.
Definition generator.hpp:29
A notifier which can be used to call a set of registered callbacks.
Definition notifier.hpp:25
True if T is a forwarded type of Forward.
Definition concepts.hpp:130