Belphemur / SoundSwitch

C# application to switch default playing device. Download: https://soundswitch.aaflalo.me/
https://soundswitch.aaflalo.me/
GNU General Public License v2.0
2.46k stars 176 forks source link

Multiple device notifications when turning on a USB Audio interface #1168

Closed gene-pavlovsky closed 10 months ago

gene-pavlovsky commented 1 year ago

What happened?

Hi!

I have a Roland Octa-Capture USB Audio interface. When I turn it on, SoundSwitch shows multiple Playback Device and Recording Device notifications in quick succession, for all the channels that exist on the Roland. In my SoundSwitch settings, I only have the main channel (10) of the USB Audio device checked for playback device selection. I have none of the channels checked for recording device selection. So I don't expect to see any notifications related to all the other channels that I'm not using with SoundSwitch.

Here are screenshots of my settings: 2023-04-25 12_15_36-Settings 2023-04-25 12_16_00-Settings

Hope you can look into it. Thanks!

Step to reproduce

Turn on my Roland Octa-Capture USB Audio interface, wait a few seconds for it to boot.

Version

6.6.1.0

What version of Windows are you seeing the problem on?

Windows 10

Relevant log output

[12:20:57.003 INF]]{ State: Active } Refreshing all devices(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:20:57.003 INF]]{ State: Active, Unplugged } Refreshing all devices(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:01.500 INF]]{ State: Active } Refreshed all devices. 2/rec, 2/play(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:01.504 INF]]{  } [WINAPI] Default device changed to "[Capture]MAIN (OCTA-CAPTURE)":Console(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:01.504 INF]]{ Device: "[Capture]MAIN (OCTA-CAPTURE)", IconChanger: Playback } Changing icon(at SoundSwitch.Framework.TrayIcon.Icon.Changer.AbstractIconChanger.ChangeIcon)
[12:21:01.504 INF]]{ Device: "[Capture]MAIN (OCTA-CAPTURE)", IconChanger: Playback } No need to change icon(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:01.505 INF]]{ State: Active, Unplugged } Refreshed all devices. 3/rec, 3/play(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:01.677 INF]]{  } [WINAPI] Default device changed to "[Capture]MAIN (OCTA-CAPTURE)":Multimedia(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:01.677 INF]]{ State: Active } Refreshing all devices(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:01.677 INF]]{ State: Active, Unplugged } Refreshing all devices(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:01.677 INF]]{ Device: "[Capture]MAIN (OCTA-CAPTURE)", IconChanger: Playback } Changing icon(at SoundSwitch.Framework.TrayIcon.Icon.Changer.AbstractIconChanger.ChangeIcon)
[12:21:01.677 INF]]{ Device: "[Capture]MAIN (OCTA-CAPTURE)", IconChanger: Playback } No need to change icon(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:01.773 INF]]{  } [WINAPI] Default device changed to "[Capture]MAIN (OCTA-CAPTURE)":Communications(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:01.773 INF]]{ Device: "[Capture]MAIN (OCTA-CAPTURE)", IconChanger: Playback } Changing icon(at SoundSwitch.Framework.TrayIcon.Icon.Changer.AbstractIconChanger.ChangeIcon)
[12:21:01.867 INF]]{  } [WINAPI] Default device changed to "[Capture]10 (OCTA-CAPTURE)":Console(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:01.867 INF]]{ Device: "[Capture]10 (OCTA-CAPTURE)", IconChanger: Playback } Changing icon(at SoundSwitch.Framework.TrayIcon.Icon.Changer.AbstractIconChanger.ChangeIcon)
[12:21:01.867 INF]]{ Device: "[Capture]10 (OCTA-CAPTURE)", IconChanger: Playback } No need to change icon(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:01.963 INF]]{  } [WINAPI] Default device changed to "[Capture]10 (OCTA-CAPTURE)":Multimedia(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:01.963 INF]]{ Device: "[Capture]10 (OCTA-CAPTURE)", IconChanger: Playback } Changing icon(at SoundSwitch.Framework.TrayIcon.Icon.Changer.AbstractIconChanger.ChangeIcon)
[12:21:01.963 INF]]{ Device: "[Capture]10 (OCTA-CAPTURE)", IconChanger: Playback } No need to change icon(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:02.088 INF]]{  } [WINAPI] Default device changed to "[Capture]10 (OCTA-CAPTURE)":Communications(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:02.088 INF]]{ Device: "[Capture]10 (OCTA-CAPTURE)", IconChanger: Playback } Changing icon(at SoundSwitch.Framework.TrayIcon.Icon.Changer.AbstractIconChanger.ChangeIcon)
[12:21:02.198 INF]]{  } [WINAPI] Default device changed to "[Render]10 (OCTA-CAPTURE)":Console(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:02.199 INF]]{ Device: "[Render]10 (OCTA-CAPTURE)", IconChanger: Playback } Changing icon(at SoundSwitch.Framework.TrayIcon.Icon.Changer.AbstractIconChanger.ChangeIcon)
[12:21:02.202 INF]]{ Device: "[Render]10 (OCTA-CAPTURE)", IconChanger: Playback } Icon replaced(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:02.293 INF]]{  } [WINAPI] Default device changed to "[Render]10 (OCTA-CAPTURE)":Multimedia(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:02.293 INF]]{ Device: "[Render]10 (OCTA-CAPTURE)", IconChanger: Playback } Changing icon(at SoundSwitch.Framework.TrayIcon.Icon.Changer.AbstractIconChanger.ChangeIcon)
[12:21:02.297 INF]]{ Device: "[Render]10 (OCTA-CAPTURE)", IconChanger: Playback } Icon replaced(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:02.388 INF]]{  } [WINAPI] Default device changed to "[Render]10 (OCTA-CAPTURE)":Communications(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:02.389 INF]]{ Device: "[Render]10 (OCTA-CAPTURE)", IconChanger: Playback } Changing icon(at SoundSwitch.Framework.TrayIcon.Icon.Changer.AbstractIconChanger.ChangeIcon)
[12:21:02.484 INF]]{  } [WINAPI] Default device changed to "[Capture]8 (OCTA-CAPTURE)":Console(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:02.485 INF]]{ Device: "[Capture]8 (OCTA-CAPTURE)", IconChanger: Playback } Changing icon(at SoundSwitch.Framework.TrayIcon.Icon.Changer.AbstractIconChanger.ChangeIcon)
[12:21:02.485 INF]]{ Device: "[Capture]8 (OCTA-CAPTURE)", IconChanger: Playback } No need to change icon(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:02.579 INF]]{  } [WINAPI] Default device changed to "[Capture]8 (OCTA-CAPTURE)":Multimedia(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:02.580 INF]]{ Device: "[Capture]8 (OCTA-CAPTURE)", IconChanger: Playback } Changing icon(at SoundSwitch.Framework.TrayIcon.Icon.Changer.AbstractIconChanger.ChangeIcon)
[12:21:02.580 INF]]{ Device: "[Capture]8 (OCTA-CAPTURE)", IconChanger: Playback } No need to change icon(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:03.065 INF]]{ State: Active } Refreshed all devices. 7/rec, 7/play(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:03.066 INF]]{ State: Active } Refreshing all devices(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:03.315 INF]]{ State: Active, Unplugged } Refreshed all devices. 8/rec, 8/play(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:03.315 INF]]{ State: Active, Unplugged } Refreshing all devices(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:03.315 INF]]{  } [WINAPI] Default device changed to "[Capture]4 (OCTA-CAPTURE)":Multimedia(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:03.315 INF]]{ Device: "[Capture]4 (OCTA-CAPTURE)", IconChanger: Playback } Changing icon(at SoundSwitch.Framework.TrayIcon.Icon.Changer.AbstractIconChanger.ChangeIcon)
[12:21:03.316 INF]]{ Device: "[Capture]4 (OCTA-CAPTURE)", IconChanger: Playback } No need to change icon(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:04.191 INF]]{ State: Active } Refreshed all devices. 7/rec, 7/play(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:04.191 INF]]{  } [WINAPI] Default device changed to "[Render]2 (OCTA-CAPTURE)":Communications(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:04.191 INF]]{ State: Active } Refreshing all devices(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:04.191 INF]]{ Device: "[Render]2 (OCTA-CAPTURE)", IconChanger: Playback } Changing icon(at SoundSwitch.Framework.TrayIcon.Icon.Changer.AbstractIconChanger.ChangeIcon)
[12:21:04.626 INF]]{ State: Active, Unplugged } Refreshed all devices. 8/rec, 8/play(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:04.626 INF]]{  } [WINAPI] Default device changed to "[Capture]2 (OCTA-CAPTURE)":Communications(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:04.626 INF]]{ State: Active, Unplugged } Refreshing all devices(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:04.626 INF]]{ Device: "[Capture]2 (OCTA-CAPTURE)", IconChanger: Playback } Changing icon(at SoundSwitch.Framework.TrayIcon.Icon.Changer.AbstractIconChanger.ChangeIcon)
[12:21:04.627 INF]]{  } [WINAPI] Default device changed to "[Capture]2 (OCTA-CAPTURE)":Multimedia(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:04.627 INF]]{ Device: "[Capture]2 (OCTA-CAPTURE)", IconChanger: Playback } Changing icon(at SoundSwitch.Framework.TrayIcon.Icon.Changer.AbstractIconChanger.ChangeIcon)
[12:21:04.627 INF]]{ Device: "[Capture]2 (OCTA-CAPTURE)", IconChanger: Playback } No need to change icon(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:04.627 INF]]{  } [WINAPI] Default device changed to "[Capture]2 (OCTA-CAPTURE)":Console(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:04.627 INF]]{ Device: "[Capture]2 (OCTA-CAPTURE)", IconChanger: Playback } Changing icon(at SoundSwitch.Framework.TrayIcon.Icon.Changer.AbstractIconChanger.ChangeIcon)
[12:21:04.628 INF]]{ Device: "[Capture]2 (OCTA-CAPTURE)", IconChanger: Playback } No need to change icon(at SoundSwitch.Model.AppModel+DefaultDeviceChangedJob.ExecuteAsync)
[12:21:05.251 INF]]{ State: Active } Refreshed all devices. 7/rec, 7/play(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:05.251 INF]]{ State: Active } Refreshing all devices(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:05.848 INF]]{ State: Active, Unplugged } Refreshed all devices. 8/rec, 8/play(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:05.848 INF]]{ State: Active, Unplugged } Refreshing all devices(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:06.290 INF]]{ State: Active } Refreshed all devices. 7/rec, 7/play(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:06.290 INF]]{ State: Active } Refreshing all devices(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:07.085 INF]]{ State: Active, Unplugged } Refreshed all devices. 8/rec, 8/play(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:07.085 INF]]{ State: Active, Unplugged } Refreshing all devices(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:07.327 INF]]{ State: Active } Refreshed all devices. 7/rec, 7/play(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:08.163 INF]]{ State: Active, Unplugged } Refreshed all devices. 8/rec, 8/play(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:08.163 INF]]{ State: Active, Unplugged } Refreshing all devices(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
[12:21:09.194 INF]]{ State: Active, Unplugged } Refreshed all devices. 8/rec, 8/play(at SoundSwitch.Framework.Audio.Lister.CachedAudioDeviceLister.Refresh)
Belphemur commented 1 year ago

Hello,

SoundSwitch notify when there is any change to the playback or recording device in Windows. This means, when you plug the USB capture card, Windows iterate though each of the device as they get connected.

I have a debounce of 200ms to try to avoid the spam, but I guess, it's slower than that so you see all notifications. Not much I can do.