HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
audio_system_win32.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#pragma once
6
7#include "audio_system.hpp"
8#include "../wfree_fifo.hpp"
9#include <memory>
10
11struct IMMDeviceEnumerator;
12
13namespace hi::inline v1 {
14class audio_system_win32_notification_client;
15class audio_system_win32;
16
18 virtual void handle_event(audio_system_win32 *self) noexcept = 0;
19};
20
22public:
23 using super = audio_system;
24
26 virtual ~audio_system_win32();
27
28 [[nodiscard]] generator<audio_device &> devices() noexcept override
29 {
30 for (hilet &device : _devices) {
31 co_yield *device;
32 }
33 }
34
35private:
46
47 IMMDeviceEnumerator *_device_enumerator;
49
52 void update_device_list() noexcept;
53
54 friend class audio_system_win32_notification_client;
55};
56
57} // namespace hi::inline v1
#define hilet
Invariant should be the default for variables.
Definition utility.hpp:23
DOXYGEN BUG.
Definition algorithm.hpp:13
Definition audio_system.hpp:18
Definition audio_system_win32.hpp:17
Definition audio_system_win32.hpp:21
generator< audio_device & > devices() noexcept override
The devices that are part of the audio system.
Definition audio_system_win32.hpp:28
A return value for a generator-function.
Definition generator.hpp:29