HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
audio_system_win32.hpp
1// Copyright Take Vos 2020.
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 "audio_system_delegate.hpp"
9#include <memory>
10
11struct IMMDeviceEnumerator;
12
13namespace tt {
14
15class audio_system_win32_notification_client;
16
18public:
19 using super = audio_system;
20
23
24 void init() noexcept override;
25
26 [[nodiscard]] std::vector<std::shared_ptr<audio_device>> devices() noexcept override
27 {
28 ttlet lock = std::scoped_lock(audio_system::mutex);
29 return _devices;
30 }
31
32 void update_device_list() noexcept;
33
34private:
36 IMMDeviceEnumerator *_device_enumerator;
37 audio_system_win32_notification_client *_notification_client;
38
39 void default_device_changed() noexcept;
40 void device_added() noexcept;
41 void device_removed(std::string device_id) noexcept;
42 void device_state_changed(std::string device_id) noexcept;
43 void device_property_value_changed(std::string device_id) noexcept;
44
45 friend audio_system_win32_notification_client;
46};
47
48}
Definition audio_system.hpp:19
Definition audio_system_win32.hpp:17
Class that hold either a weak_ptr or a unique_ptr This class is to hold a weak_ptr,...
Definition weak_or_unique_ptr.hpp:25