1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/*
* Copyright 2021 Andrew Eikum for CodeWeavers
* Copyright 2020 Rémi Bernon for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifdef __WIDL__
#pragma winrt ns_prefix
#endif
import "inspectable.idl";
import "eventtoken.idl";
import "windows.foundation.idl";
namespace Windows {
namespace Media {
namespace Devices {
typedef enum AudioDeviceRole AudioDeviceRole;
interface IDefaultAudioDeviceChangedEventArgs;
interface IMediaDeviceStatics;
runtimeclass DefaultAudioCaptureDeviceChangedEventArgs;
runtimeclass DefaultAudioRenderDeviceChangedEventArgs;
runtimeclass MediaDevice;
}
}
}
namespace Windows {
namespace Media {
namespace Devices {
declare {
interface Windows.Foundation.TypedEventHandler<IInspectable *, Windows.Media.Devices.DefaultAudioCaptureDeviceChangedEventArgs *>;
interface Windows.Foundation.TypedEventHandler<IInspectable *, Windows.Media.Devices.DefaultAudioRenderDeviceChangedEventArgs *>;
}
}
}
}
namespace Windows {
namespace Media {
namespace Devices {
enum AudioDeviceRole {
Default = 0,
Communications = 1,
};
}
}
}
namespace Windows {
namespace Media {
namespace Devices {
[
uuid(110f882f-1c05-4657-a18e-47c9b69f07ab)
]
interface IDefaultAudioDeviceChangedEventArgs : IInspectable
{
[propget] HRESULT Id([out] [retval] HSTRING *value);
[propget] HRESULT Role([out] [retval] Windows.Media.Devices.AudioDeviceRole *value);
}
[
exclusiveto(Windows.Media.Devices.MediaDevice),
uuid(aa2d9a40-909f-4bba-bf8b-0c0d296f14f0)
]
interface IMediaDeviceStatics : IInspectable
{
HRESULT GetAudioCaptureSelector([out] [retval] HSTRING *value);
HRESULT GetAudioRenderSelector([out] [retval] HSTRING *value);
HRESULT GetVideoCaptureSelector([out] [retval] HSTRING *value);
HRESULT GetDefaultAudioCaptureId([in] Windows.Media.Devices.AudioDeviceRole role, [out] [retval] HSTRING *value);
HRESULT GetDefaultAudioRenderId([in] Windows.Media.Devices.AudioDeviceRole role, [out] [retval] HSTRING *value);
[eventadd] HRESULT DefaultAudioCaptureDeviceChanged(
[in] Windows.Foundation.TypedEventHandler<IInspectable *, Windows.Media.Devices.DefaultAudioCaptureDeviceChangedEventArgs *> *handler,
[out, retval] EventRegistrationToken* token);
[eventremove] HRESULT DefaultAudioCaptureDeviceChanged(
[in] EventRegistrationToken token);
[eventadd] HRESULT DefaultAudioRenderDeviceChanged(
[in] Windows.Foundation.TypedEventHandler<IInspectable *, Windows.Media.Devices.DefaultAudioRenderDeviceChangedEventArgs *> *handler,
[out, retval] EventRegistrationToken* token);
[eventremove] HRESULT DefaultAudioRenderDeviceChanged(
[in] EventRegistrationToken token);
}
[
activatable(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(agile),
static(Windows.Media.Devices.IMediaDeviceStatics, Windows.Foundation.UniversalApiContract, 1.0),
]
runtimeclass MediaDevice
{
}
[
marshaling_behavior(agile)
]
runtimeclass DefaultAudioRenderDeviceChangedEventArgs
{
[default] interface Windows.Media.Devices.IDefaultAudioDeviceChangedEventArgs;
}
[
marshaling_behavior(agile)
]
runtimeclass DefaultAudioCaptureDeviceChangedEventArgs
{
[default] interface Windows.Media.Devices.IDefaultAudioDeviceChangedEventArgs;
}
}
}
}