HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
audio_system_aggregate.hpp
1// Copyright Take Vos 2020, 2022.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
5#include "audio_system.hpp"
6#include "../algorithm/module.hpp"
7#include "../macros.hpp"
8#include <algorithm>
9
10hi_export_module(hikogui.audio.audio_system_aggregate);
11
12namespace hi { inline namespace v1 {
13
14hi_export class audio_system_aggregate : public audio_system {
15public:
16 using super = audio_system;
17
18 audio_system_aggregate() = default;
19 virtual ~audio_system_aggregate() {}
20
22 {
23 for (auto &child : _children) {
24 for (auto &device: child.system->devices()) {
25 co_yield device;
26 }
27 }
28 }
29
31 {
32 auto new_cbt = new_child->subscribe([this] {
33 _notifier();
34 });
35
37 }
38
39private:
40 struct child_type {
42 audio_system::callback_token cbt;
43 };
44
46};
47
48}} // namespace hi::inline v1
DOXYGEN BUG.
Definition algorithm.hpp:16
geometry/margins.hpp
Definition lookahead_iterator.hpp:5
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:377
Definition audio_system.hpp:22
Definition audio_system_aggregate.hpp:14
generator< audio_device & > devices() noexcept override
The devices that are part of the audio system.
Definition audio_system_aggregate.hpp:21
T emplace_back(T... args)
T move(T... args)