Giter VIP home page Giter VIP logo

audio-switcher's People

Contributors

anaisbetts avatar davkean avatar hmemcpy avatar ianvdl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

audio-switcher's Issues

Crash with no sound card

Application crashes when there id no sound card in the system. This may happen before I power on my external card or get my headphone out and pljug them in.

Why is PInvoke used to extract the icons from the dll?

I was looking through the code when I noriced that LoadLibraryEx was PInvoked. Ok, what dark magic requires this? Loading all the icons that get embedded into the DLL apparently.

It seems like a lot of low level code to load some icons. This can be done in a completely managed fashion. Is there any reason you preferred this unmanaged method?

Notification icon looks distorted when running at a higher DPI

Repro:

  1. Right-click on Desktop, choose Screen resolution
  2. Choose Make text and other items larger or smaller
  3. Under Change the size of all items, check Let me choose one scaling level for all my displays
  4. Change to Larger - 150%
  5. Log out and then back in

image

Looks like we probably need at least a 32x32 version of the icon that @Ianvdl made.

Toggle between Playback view and Recording view?

I see in the settings under General Behavior there is a Default GUI Devices option. Is it however possible to toggle between Playback devices and Recording devices whether with a click handle or keyboard shortcut when the GUI is visible?

The screenshot in the README displays both device types being shown on the same view. I see only Playback devices.

Throws error when connecting over RDP

The app shows the following exception window when entering an RDP session.

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidCastException: Specified cast is not valid.
   at AudioSwitcher.Audio.AudioDeviceManager.SetDefaultAudioDevice(AudioDevice device, AudioDeviceRole role) in C:\Repos\audio-switcher\src\AudioSwitcher\Audio\AudioDeviceManager.cs:line 78
   at AudioSwitcher.Audio.AudioDeviceManager.SetDefaultAudioDevice(AudioDevice device) in C:\Repos\audio-switcher\src\AudioSwitcher\Audio\AudioDeviceManager.cs:line 71
   at AudioSwitcher.Audio.InputSwitcherService.OnDeviceStateChanged(Object sender, AudioDeviceStateEventArgs e) in C:\Repos\audio-switcher\src\AudioSwitcher\Audio\InputSwitcherService.cs:line 41
   at AudioSwitcher.Audio.AudioDeviceManager.<>c__DisplayClass24_0.<AudioSwitcher.Audio.Interop.IMMNotificationClient.OnDeviceStateChanged>b__0() in C:\Repos\audio-switcher\src\AudioSwitcher\Audio\AudioDeviceManager.cs:line 154
   at AudioSwitcher.Audio.AudioDeviceManager.<>c__DisplayClass30_0.<InvokeOnSynchronizationContext>b__0(Object state) in C:\Repos\audio-switcher\src\AudioSwitcher\Audio\AudioDeviceManager.cs:line 234


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
AudioSwitcher
    Assembly Version: 0.1.0.0
    Win32 Version: 0.1.0.0
    CodeBase: file:///D:/Software/Audio%20Switcher/AudioSwitcher.exe
----------------------------------------
System.ComponentModel.Composition
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel.Composition/v4.0_4.0.0.0__b77a5c561934e089/System.ComponentModel.Composition.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
MetadataViewProxies_29d9e831-87e5-4634-8a27-e4f3c4b5add9
    Assembly Version: 0.0.0.0
    Win32 Version: 4.8.3752.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel.Composition/v4.0_4.0.0.0__b77a5c561934e089/System.ComponentModel.Composition.dll
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


Symantec Reported Vitus for some Nuget packages

Our Corporate Symantec Virus protection system flagged the following NuGet item as a "Trojan.Gen.2" Virus:

squirrel.windows.0.8.0

Removing that, the app builds and seems to run fine. Who and why was that NuGet added? It appears that is an older version and perhaps that Nuget get path was commandeered? Or a false-positive?

Error upon switching.

I got a dialogue box with an error containing this information when I tried to switch audio devices from my USB headphones to my speakers. I tried to switch right after starting to play a song in Spotify. This also forced spotify to quit.

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NotImplementedException: PropVariant VT_EMPTY
   at AudioSwitcher.Audio.Interop.PropVariant.get_Value() in C:\Users\Travis\Projects\_3rdPartySource\audio-switcher\src\AudioSwitcher\Audio\Interop\MMAudio\PropVariant.cs:line 197
   at AudioSwitcher.Audio.PropertyStoreProperty.get_Value() in C:\Users\Travis\Projects\_3rdPartySource\audio-switcher\src\AudioSwitcher\Audio\Interop\MMAudio\PropertyStoreProperty.cs:line 64
   at AudioSwitcher.Audio.PropertyStore.TryGetValue(PropertyKey key, Object& value) in C:\Users\Travis\Projects\_3rdPartySource\audio-switcher\src\AudioSwitcher\Audio\Interop\MMAudio\PropertyStore.cs:line 142
   at AudioSwitcher.Audio.AudioDevice.get_DeviceFriendlyName() in C:\Users\Travis\Projects\_3rdPartySource\audio-switcher\src\AudioSwitcher\Audio\AudioDevice.cs:line 83
   at AudioSwitcher.UI.ViewModels.AudioDeviceViewModel.UpdateStatus(AudioDeviceManager deviceManager) in C:\Users\Travis\Projects\_3rdPartySource\audio-switcher\src\AudioSwitcher\UI\ViewModels\AudioDeviceViewModel.cs:line 80
   at AudioSwitcher.UI.ViewModels.AudioDeviceViewModelManager.OnDefaultDeviceChanged(Object sender, DefaultAudioDeviceEventArgs e) in C:\Users\Travis\Projects\_3rdPartySource\audio-switcher\src\AudioSwitcher\UI\ViewModels\AudioDeviceViewModelManager.cs:line 115
   at AudioSwitcher.Audio.AudioDeviceManager.<>c__DisplayClass6.<AudioSwitcher_Audio_Interop_IMMNotificationClient_OnDefaultDeviceChanged>b__7() in C:\Users\Travis\Projects\_3rdPartySource\audio-switcher\src\AudioSwitcher\Audio\AudioDeviceManager.cs:line 187
   at AudioSwitcher.Audio.AudioDeviceManager.<>c__DisplayClass10.<InvokeOnSynchronizationContext>b__11(Object state) in C:\Users\Travis\Projects\_3rdPartySource\audio-switcher\src\AudioSwitcher\Audio\AudioDeviceManager.cs:line 223


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.7.0 built by: NETFXREL1
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
AudioSwitcher
    Assembly Version: 0.1.0.0
    Win32 Version: 0.1.0.0
    CodeBase: file:///C:/Users/Travis/Projects/_3rdPartySource/audio-switcher/src/AudioSwitcher/bin/Debug/AudioSwitcher.exe
----------------------------------------
System.ComponentModel.Composition
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.7.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel.Composition/v4.0_4.0.0.0__b77a5c561934e089/System.ComponentModel.Composition.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.7.0 built by: NETFXREL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.7.0 built by: NETFXREL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.7.0 built by: NETFXREL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.7.0 built by: NETFXREL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.7.0 built by: NETFXREL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.7.0 built by: NETFXREL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
MetadataViewProxies_29a73af8-171c-43e3-8633-4c51b83b5bf3
    Assembly Version: 0.0.0.0
    Win32 Version: 4.6.7.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel.Composition/v4.0_4.0.0.0__b77a5c561934e089/System.ComponentModel.Composition.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

@byteblast Thanks!

Ability to reconnect bluetooth devices

For example, bluetooth headphones usually paired with a smartphone. To connect them to PC, you have to turn on discovery mode on the headphones. During this mode, you have to click Connect menu item in context menu in standard Playback Devices dialog, thus making audio-switcher useless...

Having this feature "Reconnect to Bluetooth Device" built-in, Playback Devices dialog will be totally forgotten ;)

Crash on Windows 10

Crashes when setting a new default audio device.
Exception details:

An unhandled exception of type 'System.InvalidCastException' occurred in AudioSwitcher.exe

Additional information: Unable to cast COM object of type
'AudioSwitcher.Audio.Interop.PolicyConfig' to interface type
'AudioSwitcher.Audio.Interop.IPolicyConfig'. This operation failed
because the QueryInterface call on the COM component for the
interface with IID '{F8679F50-850A-41CF-9C72-430F290290C8}'
failed due to the following error: No such interface supported
(Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

Crash is in

AudioDeviceManager.SetDefaultAudioDevice Line 85 - called with one of my audio devices & AudioDeviceRole.Multimedia.

This is on Win10 Build 10041.

Let me know if there's anything I can do to investigate!

Support device combos

For my usage pattern it would be ideal if this app supported play/record device combos.

I almost always switch between my headset (mic/speaker) and my PC speaker with my Rode Podcaster mic on my desktop, or between my headset (mic/speaker) and my PC speaker/mic on my Surface.

I almost never switch only the playback or the record device - can't remember the last time I did such a thing actually.

So having Audio Switcher support play/record device pairs as a single option would be really ideal.

Suepend and resume caused this

Might be because i plugged in an external mic and speaker before resuming

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
   at AudioSwitcher.Audio.AudioDeviceManager.GetDefaultAudioDevice(AudioDeviceKind kind, AudioDeviceRole role) in c:\Code\audio-switcher\src\AudioSwitcher\Audio\AudioDeviceManager.cs:line 124
   at AudioSwitcher.Audio.AudioDeviceManager.IsDefaultAudioDevice(AudioDevice device, AudioDeviceRole role) in c:\Code\audio-switcher\src\AudioSwitcher\Audio\AudioDeviceManager.cs:line 107
   at AudioSwitcher.UI.ViewModels.AudioDeviceViewModel.CalculateDeviceDefaultState(AudioDeviceManager deviceManager) in c:\Code\audio-switcher\src\AudioSwitcher\UI\ViewModels\AudioDeviceViewModel.cs:line 254
   at AudioSwitcher.UI.ViewModels.AudioDeviceViewModel.UpdateStatus(AudioDeviceManager deviceManager) in c:\Code\audio-switcher\src\AudioSwitcher\UI\ViewModels\AudioDeviceViewModel.cs:line 79
   at AudioSwitcher.UI.ViewModels.AudioDeviceViewModelManager.OnDeviceStateChanged(Object sender, AudioDeviceStateEventArgs e) in c:\Code\audio-switcher\src\AudioSwitcher\UI\ViewModels\AudioDeviceViewModelManager.cs:line 99
   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   at AudioSwitcher.Audio.AudioDeviceManager.<>c__DisplayClass1.<AudioSwitcher.Audio.Interop.IMMNotificationClient.OnDeviceStateChanged>b__0() in c:\Code\audio-switcher\src\AudioSwitcher\Audio\AudioDeviceManager.cs:line 154
   at AudioSwitcher.Audio.AudioDeviceManager.<>c__DisplayClass11.<InvokeOnSynchronizationContext>b__f(Object state) in c:\Code\audio-switcher\src\AudioSwitcher\Audio\AudioDeviceManager.cs:line 234


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.57.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
AudioSwitcher
    Assembly Version: 0.1.0.0
    Win32 Version: 0.1.0.0
    CodeBase: file:///C:/Code/audio-switcher/src/AudioSwitcher/bin/Debug/AudioSwitcher.exe
----------------------------------------
System.ComponentModel.Composition
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.57.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel.Composition/v4.0_4.0.0.0__b77a5c561934e089/System.ComponentModel.Composition.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.57.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.57.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.57.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.57.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.57.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.57.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
MetadataViewProxies_c6889f80-f9ce-42c8-9425-72cf6f9abeef
    Assembly Version: 0.0.0.0
    Win32 Version: 4.6.57.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel.Composition/v4.0_4.0.0.0__b77a5c561934e089/System.ComponentModel.Composition.dll
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Crash on resume

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NotImplementedException: PropVariant VT_EMPTY
   at AudioSwitcher.Audio.Interop.PropVariant.get_Value()
   at AudioSwitcher.Audio.PropertyStore.TryGetValue(PropertyKey key, Object& value)
   at AudioSwitcher.Audio.AudioDevice.get_DeviceFriendlyName()
   at AudioSwitcher.UI.ViewModels.AudioDeviceViewModel.UpdateStatus(AudioDeviceManager deviceManager)
   at AudioSwitcher.UI.ViewModels.AudioDeviceViewModelManager.OnDefaultDeviceChanged(Object sender, DefaultAudioDeviceEventArgs e)
   at AudioSwitcher.Audio.AudioDeviceManager.<>c__DisplayClassa.<AudioSwitcher.Audio.Interop.IMMNotificationClient.OnDefaultDeviceChanged>b__9()
   at AudioSwitcher.Audio.AudioDeviceManager.<>c__DisplayClass11.<InvokeOnSynchronizationContext>b__f(Object state)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34014 built by: FX45W81RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
AudioSwitcher
    Assembly Version: 0.1.0.0
    Win32 Version: 0.1.0.0
    CodeBase: file:///C:/Users/Paul/AppData/Local/AudioSwitcher/app-0.1.0.0/AudioSwitcher.exe
----------------------------------------
System.ComponentModel.Composition
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel.Composition/v4.0_4.0.0.0__b77a5c561934e089/System.ComponentModel.Composition.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34239 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34230 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
MetadataViewProxies_f3d4308d-b709-40bc-8042-53249ce2c4d7
    Assembly Version: 0.0.0.0
    Win32 Version: 4.0.30319.33440
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel.Composition/v4.0_4.0.0.0__b77a5c561934e089/System.ComponentModel.Composition.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Add a build script

It would be useful to add a build script to the project so that someone without Visual Studio but with the .Net Framework SDK could build and package the project.

This would also make it easier to run on a CI platform so you could produce automatic builds on every commit.

It would be straightforward to build something out in Cake to achieve this; and I would be open to creating a pull request for this if it would fit in with your project.

Crashes on Windows 10 build 10122

Same as before - crashes when setting a new default audio device. Let me know if there's anything else I can provide.

6ani7pl 1

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidCastException: Unable to cast COM object of type 'AudioSwitcher.Audio.Interop.PolicyConfig' to interface type 'AudioSwitcher.Audio.Interop.IPolicyConfig3'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{8F9FB2AA-1C0B-4D54-B6BB-B2F2A10CE03C}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
   at AudioSwitcher.Audio.AudioDeviceManager.SetDefaultAudioDevice(AudioDevice device, AudioDeviceRole role) in c:\Users\George\Documents\GitHub\audio-switcher\src\AudioSwitcher\Audio\AudioDeviceManager.cs:line 95
   at AudioSwitcher.Audio.AudioDeviceManager.SetDefaultAudioDevice(AudioDevice device) in c:\Users\George\Documents\GitHub\audio-switcher\src\AudioSwitcher\Audio\AudioDeviceManager.cs:line 71
   at AudioSwitcher.UI.Commands.AudioDeviceCommand.Run(AudioDeviceViewModel argument) in c:\Users\George\Documents\GitHub\audio-switcher\src\AudioSwitcher\UI\Commands\AudioDeviceCommand.cs:line 28
   at AudioSwitcher.Presentation.CommandModel.Command`1.AudioSwitcher.Presentation.CommandModel.ICommand.Run(Object argument) in c:\Users\George\Documents\GitHub\audio-switcher\src\AudioSwitcher\Presentation\CommandModel\CommandOfT.cs:line 44
   at AudioSwitcher.Presentation.UI.ToolStripItemCommandBinding.OnItemClicked(Object sender, ToolStripItemClickedEventArgs e) in c:\Users\George\Documents\GitHub\audio-switcher\src\AudioSwitcher\Presentation\UI\ToolStripItemCommandBinding.cs:line 85
   at System.Windows.Forms.ToolStripItemClickedEventHandler.Invoke(Object sender, ToolStripItemClickedEventArgs e)
   at System.Windows.Forms.ToolStrip.OnItemClicked(ToolStripItemClickedEventArgs e)
   at System.Windows.Forms.ToolStripDropDown.OnItemClicked(ToolStripItemClickedEventArgs e)
   at AudioSwitcher.Presentation.UI.AudioContextMenuStrip.OnItemClicked(ToolStripItemClickedEventArgs e) in c:\Users\George\Documents\GitHub\audio-switcher\src\AudioSwitcher\Presentation\UI\AudioContextMenuStrip.cs:line 72
   at AudioSwitcher.Presentation.UI.Views.DeviceFlyoutView.OnItemClicked(ToolStripItemClickedEventArgs e) in c:\Users\George\Documents\GitHub\audio-switcher\src\AudioSwitcher\UI\Views\DeviceFlyoutView.cs:line 54
   at System.Windows.Forms.ToolStrip.HandleItemClick(ToolStripItem dismissingItem)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at AudioSwitcher.Presentation.UI.Views.DeviceFlyoutView.OnMouseUp(MouseEventArgs e) in c:\Users\George\Documents\GitHub\audio-switcher\src\AudioSwitcher\UI\Views\DeviceFlyoutView.cs:line 43
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at AudioSwitcher.Presentation.UI.Views.DeviceFlyoutView.WndProc(Message& m) in c:\Users\George\Documents\GitHub\audio-switcher\src\AudioSwitcher\UI\Views\DeviceFlyoutView.cs:line 82
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.73.0 built by: NETFXREL1
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
AudioSwitcher
    Assembly Version: 0.1.0.0
    Win32 Version: 0.1.0.0
    CodeBase: file:///C:/Users/George/Documents/GitHub/audio-switcher/src/AudioSwitcher/bin/Debug/AudioSwitcher.exe
----------------------------------------
System.ComponentModel.Composition
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.73.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel.Composition/v4.0_4.0.0.0__b77a5c561934e089/System.ComponentModel.Composition.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.73.0 built by: NETFXREL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.73.0 built by: NETFXREL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.73.0 built by: NETFXREL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.73.0 built by: NETFXREL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.73.0 built by: NETFXREL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.73.0 built by: NETFXREL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
MetadataViewProxies_959aa4f6-7bca-45df-b99c-f82502f033ee
    Assembly Version: 0.0.0.0
    Win32 Version: 4.6.73.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel.Composition/v4.0_4.0.0.0__b77a5c561934e089/System.ComponentModel.Composition.dll
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.73.0 built by: NETFXREL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Cannot use ENTER to open device menu

Repro:

  1. Press TAB until Show Hidden Icons has focus
  2. Use the arrow keys to navigate to Audio Switcher
  3. Press SPACE

Expected: For the device menu to open

Actual: Nothing

Make this a DLL, and add powershell support

I can open separate issues for these, but I think the "should we" needs to be discussed together.

It would be cool to have some powershell methods for switching the audio device from the CLI, for those of us into that kind of thing. Two that come to mind are of course Get-AudioDevice [-Active] [-Filter] and Set-AudioDevice [-Name]

To do that you need a DLL, not an exe. Rather than make a DLL and a wrapper EXE, it would be simpler to replace the static void Main() call with a call that rundll32.exe can make via UnmanagedExports The chocolatey package can then include a batch file to start this up manually, and add that batch file to the start menu.

Also, once this is a DLL, it makes sense to make this a regular nuget package and supporting an API as well.

Crash when installing/uninstalling a driver

Reinstalled the desktop camera drivers on my machine and audio switcher crashed with the following:

System.NotImplementedException: PropVariant VT_EMPTY
at AudioSwitcher.Audio.Interop.PropVariant.get_Value()
at AudioSwitcher.Audio.PropertyStoreProperty.get_Value()
at AudioSwitcher.Audio.PropertyStore.TryGetValue(PropertyKey key, Object& value)
at AudioSwitcher.Audio.AudioDevice.get_DeviceFriendlyName()
at AudioSwitcher.UI.ViewModels.AudioDeviceViewModel.UpdateStatus(AudioDeviceManager deviceManager)
at AudioSwitcher.UI.ViewModels.AudioDeviceViewModelManager.OnDefaultDeviceChanged(Object sender, DefaultAudioDeviceEventArgs e)
at AudioSwitcher.Audio.AudioDeviceManager.<>c__DisplayClassa.<AudioSwitcher.Audio.Interop.IMMNotificationClient.OnDefaultDeviceChanged>b__9()
at AudioSwitcher.Audio.AudioDeviceManager.<>c__DisplayClass11.b__f(Object state)

Can someone provide a binary?

Why on earth do you require people to build this on their own? This makes absolutely no sense. Please consider providing a binary in the release section which GitHub offers for this special purpose.

Hot Key Assignment

First off, sorry for posting this here as this isn't a current feature issue or a forum for feature requests, but was thinking to take the concept of AudioSwitcher to the next level. It's main purpose is to simplify the setting up of specifying the default input/output audio device. It seem that the ability to assign a Hot-Key combination to a audio device would be even more useful as the user wouldn't have to fumble with clicking and such.

Awesome app nonetheless.
Thanks for sharing.

Trusted Binary needed

Hey

I find this piece of code very appealing for the problem that is solves.
I get that there is no binary and that I gotta have build my own. I downloaded VS2013 and opened it, but it went instantly to "Trial expired" Mode. He didnt give me a single minute of using VS to build your code. After searching I found the mandatory StackOverflow Thread where people had success with using a special setTime Script (SO link, RunAsDate v1.31). I tried different Times and Years but nothing worked.
I could sign up apparently and might be able to receive a license, but that is not how OpenSource should be handled imho. Currently, I'm not able to build the projects because of the caged IDE. Do you see any way of offering a trusted binary - because I would snatch it in a heartbeat :)

Mortimer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.