File tree 2 files changed +16
-8
lines changed
SoundSwitch.Audio.Manager/Interop
Interface/Policy/Extended
2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -9,16 +9,20 @@ internal static class AudioPolicyConfigFactory
9
9
10
10
public static IAudioPolicyConfig Create ( )
11
11
{
12
- if ( Environment . OSVersion . Version . Major < 10 )
12
+ return Com . Threading . ComThread . Invoke < IAudioPolicyConfig > ( ( ) =>
13
13
{
14
- return new UnsupportedAudioPolicyConfig ( ) ;
15
- }
16
- if ( Environment . OSVersion . Version . Build >= OS_21H2_VERSION )
17
- {
18
- return new Post21H2AudioPolicyConfig ( ) ;
19
- }
14
+ if ( Environment . OSVersion . Version . Major < 10 )
15
+ {
16
+ return new UnsupportedAudioPolicyConfig ( ) ;
17
+ }
18
+
19
+ if ( Environment . OSVersion . Version . Build >= OS_21H2_VERSION )
20
+ {
21
+ return new Post21H2AudioPolicyConfig ( ) ;
22
+ }
20
23
21
- return new Pre21H2AudioPolicyConfig ( ) ;
24
+ return new Pre21H2AudioPolicyConfig ( ) ;
25
+ } ) ;
22
26
}
23
27
}
24
28
}
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ namespace SoundSwitch.Audio.Manager.Interop.Interface.Policy.Extended
10
10
[ ComImport ]
11
11
public interface IAudioPolicyConfigFactoryVariant21H2Windows11
12
12
{
13
+ void GetIids ( out int iidCount , out IntPtr iids ) ;
14
+ void GetRuntimeClassName ( out IntPtr className ) ;
15
+ void GetTrustLevel ( out WinRT . TrustLevel trustLevel ) ;
16
+
13
17
int __incomplete__add_CtxVolumeChange ( ) ;
14
18
int __incomplete__remove_CtxVolumeChanged ( ) ;
15
19
int __incomplete__add_RingerVibrateStateChanged ( ) ;
You can’t perform that action at this time.
0 commit comments