| 1 |
/* |
| 2 |
* Copyright (C) 2023 Biswapriyo Nath |
| 3 |
* |
| 4 |
* This library is free software; you can redistribute it and/or |
| 5 |
* modify it under the terms of the GNU Lesser General Public |
| 6 |
* License as published by the Free Software Foundation; either |
| 7 |
* version 2.1 of the License, or (at your option) any later version. |
| 8 |
* |
| 9 |
* This library is distributed in the hope that it will be useful, |
| 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 |
* Lesser General Public License for more details. |
| 13 |
* |
| 14 |
* You should have received a copy of the GNU Lesser General Public |
| 15 |
* License along with this library; if not, write to the Free Software |
| 16 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
| 17 |
*/ |
| 18 |
|
| 19 |
#ifdef __WIDL__ |
| 20 |
#pragma winrt ns_prefix |
| 21 |
#endif |
| 22 |
|
| 23 |
import "inspectable.idl"; |
| 24 |
import "windows.foundation.idl"; |
| 25 |
import "windows.media.idl"; |
| 26 |
import "windows.media.capture.idl"; |
| 27 |
import "windows.media.render.idl"; |
| 28 |
import "windows.storage.streams.idl"; |
| 29 |
|
| 30 |
namespace Windows.Media.Effects { |
| 31 |
typedef enum AudioEffectType AudioEffectType; |
| 32 |
|
| 33 |
interface IAudioCaptureEffectsManager; |
| 34 |
interface IAudioEffect; |
| 35 |
interface IAudioEffectsManagerStatics; |
| 36 |
interface IAudioRenderEffectsManager; |
| 37 |
interface IAudioRenderEffectsManager2; |
| 38 |
|
| 39 |
runtimeclass AudioCaptureEffectsManager; |
| 40 |
runtimeclass AudioEffect; |
| 41 |
runtimeclass AudioEffectsManager; |
| 42 |
runtimeclass AudioRenderEffectsManager; |
| 43 |
|
| 44 |
declare { |
| 45 |
interface Windows.Foundation.Collections.IIterable<Windows.Media.Effects.AudioEffect *>; |
| 46 |
interface Windows.Foundation.Collections.IIterator<Windows.Media.Effects.AudioEffect *>; |
| 47 |
interface Windows.Foundation.Collections.IVectorView<Windows.Media.Effects.AudioEffect *>; |
| 48 |
interface Windows.Foundation.TypedEventHandler<Windows.Media.Effects.AudioCaptureEffectsManager *, IInspectable *>; |
| 49 |
interface Windows.Foundation.TypedEventHandler<Windows.Media.Effects.AudioRenderEffectsManager *, IInspectable *>; |
| 50 |
} |
| 51 |
|
| 52 |
[ |
| 53 |
contract(Windows.Foundation.UniversalApiContract, 1.0) |
| 54 |
] |
| 55 |
enum AudioEffectType |
| 56 |
{ |
| 57 |
Other = 0, |
| 58 |
AcousticEchoCancellation = 1, |
| 59 |
NoiseSuppression = 2, |
| 60 |
AutomaticGainControl = 3, |
| 61 |
BeamForming = 4, |
| 62 |
ConstantToneRemoval = 5, |
| 63 |
Equalizer = 6, |
| 64 |
LoudnessEqualizer = 7, |
| 65 |
BassBoost = 8, |
| 66 |
VirtualSurround = 9, |
| 67 |
VirtualHeadphones = 10, |
| 68 |
SpeakerFill = 11, |
| 69 |
RoomCorrection = 12, |
| 70 |
BassManagement = 13, |
| 71 |
EnvironmentalEffects = 14, |
| 72 |
SpeakerProtection = 15, |
| 73 |
SpeakerCompensation = 16, |
| 74 |
DynamicRangeCompression = 17, |
| 75 |
[contract(Windows.Foundation.UniversalApiContract, 12.0)] |
| 76 |
FarFieldBeamForming = 18, |
| 77 |
[contract(Windows.Foundation.UniversalApiContract, 13.0)] |
| 78 |
DeepNoiseSuppression = 19, |
| 79 |
}; |
| 80 |
|
| 81 |
[ |
| 82 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 83 |
exclusiveto(Windows.Media.Effects.AudioCaptureEffectsManager), |
| 84 |
uuid(8f85c271-038d-4393-8298-540110608eef) |
| 85 |
] |
| 86 |
interface IAudioCaptureEffectsManager : IInspectable |
| 87 |
{ |
| 88 |
[eventadd] HRESULT AudioCaptureEffectsChanged( |
| 89 |
[in] Windows.Foundation.TypedEventHandler<Windows.Media.Effects.AudioCaptureEffectsManager *, IInspectable *> *handler, |
| 90 |
[out, retval] EventRegistrationToken *token |
| 91 |
); |
| 92 |
[eventremove] HRESULT AudioCaptureEffectsChanged( |
| 93 |
[in] EventRegistrationToken token |
| 94 |
); |
| 95 |
HRESULT GetAudioCaptureEffects( |
| 96 |
[out, retval] Windows.Foundation.Collections.IVectorView<Windows.Media.Effects.AudioEffect *> **effects |
| 97 |
); |
| 98 |
} |
| 99 |
|
| 100 |
[ |
| 101 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 102 |
exclusiveto(Windows.Media.Effects.AudioEffect), |
| 103 |
uuid(34aafa51-9207-4055-be93-6e5734a86ae4) |
| 104 |
] |
| 105 |
interface IAudioEffect : IInspectable |
| 106 |
{ |
| 107 |
[propget] HRESULT AudioEffectType([out, retval] Windows.Media.Effects.AudioEffectType *value); |
| 108 |
} |
| 109 |
|
| 110 |
[ |
| 111 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 112 |
exclusiveto(Windows.Media.Effects.AudioEffectsManager), |
| 113 |
uuid(66406c04-86fa-47cc-a315-f489d8c3fe10) |
| 114 |
] |
| 115 |
interface IAudioEffectsManagerStatics : IInspectable |
| 116 |
{ |
| 117 |
[overload("CreateAudioRenderEffectsManager")] |
| 118 |
HRESULT CreateAudioRenderEffectsManager( |
| 119 |
[in] HSTRING device_id, |
| 120 |
[in] Windows.Media.Render.AudioRenderCategory category, |
| 121 |
[out, retval] Windows.Media.Effects.AudioRenderEffectsManager **value |
| 122 |
); |
| 123 |
[overload("CreateAudioRenderEffectsManager")] |
| 124 |
HRESULT CreateAudioRenderEffectsManagerWithMode( |
| 125 |
[in] HSTRING device_id, |
| 126 |
[in] Windows.Media.Render.AudioRenderCategory category, |
| 127 |
[in] Windows.Media.AudioProcessing mode, |
| 128 |
[out, retval] Windows.Media.Effects.AudioRenderEffectsManager **value |
| 129 |
); |
| 130 |
[overload("CreateAudioCaptureEffectsManager")] |
| 131 |
HRESULT CreateAudioCaptureEffectsManager( |
| 132 |
[in] HSTRING device_id, |
| 133 |
[in] Windows.Media.Capture.MediaCategory category, |
| 134 |
[out, retval] Windows.Media.Effects.AudioCaptureEffectsManager **value |
| 135 |
); |
| 136 |
[overload("CreateAudioCaptureEffectsManager")] |
| 137 |
HRESULT CreateAudioCaptureEffectsManagerWithMode( |
| 138 |
[in] HSTRING device_id, |
| 139 |
[in] Windows.Media.Capture.MediaCategory category, |
| 140 |
[in] Windows.Media.AudioProcessing mode, |
| 141 |
[out, retval] Windows.Media.Effects.AudioCaptureEffectsManager **value |
| 142 |
); |
| 143 |
} |
| 144 |
|
| 145 |
[ |
| 146 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 147 |
exclusiveto(Windows.Media.Effects.AudioRenderEffectsManager), |
| 148 |
uuid(4dc98966-8751-42b2-bfcb-39ca7864bd47) |
| 149 |
] |
| 150 |
interface IAudioRenderEffectsManager : IInspectable |
| 151 |
{ |
| 152 |
[eventadd] HRESULT AudioRenderEffectsChanged( |
| 153 |
[in] Windows.Foundation.TypedEventHandler<Windows.Media.Effects.AudioRenderEffectsManager *, IInspectable *> *handler, |
| 154 |
[out, retval] EventRegistrationToken *token |
| 155 |
); |
| 156 |
[eventremove] HRESULT AudioRenderEffectsChanged( |
| 157 |
[in] EventRegistrationToken token |
| 158 |
); |
| 159 |
HRESULT GetAudioRenderEffects( |
| 160 |
[out, retval] Windows.Foundation.Collections.IVectorView<Windows.Media.Effects.AudioEffect *> **effects |
| 161 |
); |
| 162 |
} |
| 163 |
|
| 164 |
[ |
| 165 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 166 |
exclusiveto(Windows.Media.Effects.AudioRenderEffectsManager), |
| 167 |
uuid(a844cd09-5ecc-44b3-bb4e-1db07287139c) |
| 168 |
] |
| 169 |
interface IAudioRenderEffectsManager2 : IInspectable |
| 170 |
{ |
| 171 |
[propget] HRESULT EffectsProviderThumbnail( |
| 172 |
[out, retval] Windows.Storage.Streams.IRandomAccessStreamWithContentType **value |
| 173 |
); |
| 174 |
[propget] HRESULT EffectsProviderSettingsLabel( |
| 175 |
[out, retval] HSTRING *value |
| 176 |
); |
| 177 |
HRESULT ShowSettingsUI(); |
| 178 |
} |
| 179 |
|
| 180 |
[ |
| 181 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 182 |
marshaling_behavior(agile), |
| 183 |
threading(mta) |
| 184 |
] |
| 185 |
runtimeclass AudioCaptureEffectsManager |
| 186 |
{ |
| 187 |
[default] interface Windows.Media.Effects.IAudioCaptureEffectsManager; |
| 188 |
} |
| 189 |
|
| 190 |
[ |
| 191 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 192 |
marshaling_behavior(agile), |
| 193 |
threading(mta) |
| 194 |
] |
| 195 |
runtimeclass AudioEffect |
| 196 |
{ |
| 197 |
[default] interface Windows.Media.Effects.IAudioEffect; |
| 198 |
} |
| 199 |
|
| 200 |
[ |
| 201 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 202 |
marshaling_behavior(agile), |
| 203 |
static(Windows.Media.Effects.IAudioEffectsManagerStatics, Windows.Foundation.UniversalApiContract, 1.0), |
| 204 |
threading(mta) |
| 205 |
] |
| 206 |
runtimeclass AudioEffectsManager |
| 207 |
{ |
| 208 |
} |
| 209 |
|
| 210 |
[ |
| 211 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 212 |
marshaling_behavior(agile), |
| 213 |
threading(mta) |
| 214 |
] |
| 215 |
runtimeclass AudioRenderEffectsManager |
| 216 |
{ |
| 217 |
[default] interface Windows.Media.Effects.IAudioRenderEffectsManager; |
| 218 |
[contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Media.Effects.IAudioRenderEffectsManager2; |
| 219 |
} |
| 220 |
} |