From 2ad7511d6285768e63d7d690ddf911de85ba9244 Mon Sep 17 00:00:00 2001 From: Antoine Aflalo Date: Tue, 26 Feb 2019 14:17:03 -0500 Subject: [PATCH] Remove old lib --- .gitmodules | 4 -- AudioDefaultSwitcher | 1 - Backup/AudioSwitcher.cs | 51 ------------------------ Backup/Interop/CPolicyConfigVista.cs | 10 ----- Backup/Interop/ERole.cs | 13 ------ Backup/Interop/HRESULT.cs | 11 ----- Backup/Interop/IPolicyConfigVista.cs | 16 -------- Backup/SoundSwitch.Audio.Policies.csproj | 15 ------- 8 files changed, 121 deletions(-) delete mode 160000 AudioDefaultSwitcher delete mode 100644 Backup/AudioSwitcher.cs delete mode 100644 Backup/Interop/CPolicyConfigVista.cs delete mode 100644 Backup/Interop/ERole.cs delete mode 100644 Backup/Interop/HRESULT.cs delete mode 100644 Backup/Interop/IPolicyConfigVista.cs delete mode 100644 Backup/SoundSwitch.Audio.Policies.csproj diff --git a/.gitmodules b/.gitmodules index 3993ce4b75..e69de29bb2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +0,0 @@ -[submodule "AudioDefaultSwitcher"] - path = AudioDefaultSwitcher - url = https://github.com/Belphemur/AudioDefaultSwitcher.git - branch = master diff --git a/AudioDefaultSwitcher b/AudioDefaultSwitcher deleted file mode 160000 index 4e524f5938..0000000000 --- a/AudioDefaultSwitcher +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4e524f59384a4d39757876cdafd93b56d45b201c diff --git a/Backup/AudioSwitcher.cs b/Backup/AudioSwitcher.cs deleted file mode 100644 index a745ca9b38..0000000000 --- a/Backup/AudioSwitcher.cs +++ /dev/null @@ -1,51 +0,0 @@ -using SoundSwitch.Audio.Policies.Interop; - -namespace SoundSwitch.Audio.Policies -{ - public class AudioSwitcher - { - private IPolicyConfigVista _configVista; - private static AudioSwitcher _instance; - - private AudioSwitcher() - { - } - - public static AudioSwitcher Instance - { - get - { - if (_instance != null) - { - return _instance; - } - - return _instance = new AudioSwitcher(); - } - } - - public IPolicyConfigVista PolicyConfig - { - get - { - if (_configVista != null) - { - return _configVista; - } - - return _configVista = (IPolicyConfigVista) new CPolicyConfigVista(); - } - } - - public bool switchTo(string deviceId, ERole role) - { - var result = PolicyConfig.SetDefaultEndpoint(deviceId, role); - if (result == HRESULT.S_OK) - { - return true; - } - - return false; - } - } -} \ No newline at end of file diff --git a/Backup/Interop/CPolicyConfigVista.cs b/Backup/Interop/CPolicyConfigVista.cs deleted file mode 100644 index 3d5b5a94cd..0000000000 --- a/Backup/Interop/CPolicyConfigVista.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Runtime.InteropServices; - -namespace SoundSwitch.Audio.Policies.Interop -{ - [Guid("294935CE-F637-4E7C-A41B-AB255460B862"), ComImport] - public class CPolicyConfigVista - { - - } -} \ No newline at end of file diff --git a/Backup/Interop/ERole.cs b/Backup/Interop/ERole.cs deleted file mode 100644 index b1b6136cb9..0000000000 --- a/Backup/Interop/ERole.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace SoundSwitch.Audio.Policies.Interop -{ - [Flags] - public enum ERole - { - eConsole = 0, - eMultimedia = 1, - eCommunications = 2, - eAll = 3 - } -} \ No newline at end of file diff --git a/Backup/Interop/HRESULT.cs b/Backup/Interop/HRESULT.cs deleted file mode 100644 index fff1803494..0000000000 --- a/Backup/Interop/HRESULT.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace SoundSwitch.Audio.Policies.Interop -{ - public enum HRESULT : uint - { - S_OK = 0x0, - S_FALSE = 0x1, - AUDCLNT_E_DEVICE_INVALIDATED = 0x88890004, - AUDCLNT_S_NO_SINGLE_PROCESS = 0x889000d, - ERROR_NOT_FOUND = 0x80070490, - } -} \ No newline at end of file diff --git a/Backup/Interop/IPolicyConfigVista.cs b/Backup/Interop/IPolicyConfigVista.cs deleted file mode 100644 index 30f90fc147..0000000000 --- a/Backup/Interop/IPolicyConfigVista.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace SoundSwitch.Audio.Policies.Interop -{ - [Guid("568b9108-44bf-40b4-9006-86afe5b5a620")] - [InterfaceType(ComInterfaceType.InterfaceIsIInspectable)] - public interface IPolicyConfigVista - { - [PreserveSig] - HRESULT SetDefaultEndpoint( - [In] string wszDeviceId, - [In] ERole eRole - ); - } -} \ No newline at end of file diff --git a/Backup/SoundSwitch.Audio.Policies.csproj b/Backup/SoundSwitch.Audio.Policies.csproj deleted file mode 100644 index 89af356243..0000000000 --- a/Backup/SoundSwitch.Audio.Policies.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - v4.7 - - - - bin\Debug\ - - - - bin\Release\ - - - \ No newline at end of file