HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
src
ttauri
audio
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
11
struct
IMMDeviceEnumerator;
12
13
namespace
tt {
14
15
class
audio_system_win32_notification_client;
16
17
class
audio_system_win32
:
public
audio_system
{
18
public
:
19
using
super
=
audio_system
;
20
21
audio_system_win32
(
weak_or_unique_ptr<audio_system_delegate>
delegate);
22
~audio_system_win32
();
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
34
private
:
35
std::vector<std::shared_ptr<audio_device>
> _devices;
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
}
tt::audio_system
Definition
audio_system.hpp:19
tt::audio_system_win32
Definition
audio_system_win32.hpp:17
tt::weak_or_unique_ptr
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
std::string
std::vector
Generated on Mon Apr 22 2024 12:53:38 for HikoGUI by
1.10.0