Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set app audio device not working on Windows 11 #52

Closed
GeekyEggo opened this issue Nov 2, 2021 · 20 comments
Closed

Set app audio device not working on Windows 11 #52

GeekyEggo opened this issue Nov 2, 2021 · 20 comments
Labels
🐞 bug Something might not be working as intended.
Milestone

Comments

@GeekyEggo
Copy link
Owner

GeekyEggo commented Nov 2, 2021

Description

  • The devices list does not load for the "Set app audio device" action on Windows 11.
  • The "Set app audio device" fails with a warning icon on Windows 11.

Cause

There were interoperability changes to Windows 11 that are resulting in Sound Deck being unable to instantiate the IAudioPolicyConfigFactory. This factory is required to enable the changing the audio device of an application.

Reading

The only other known application to provide pragmatic switching of audio devices for applications is EarTrumpet, however initial tests have been unsuccessful within Sound Deck.

@GeekyEggo GeekyEggo added the 🐞 bug Something might not be working as intended. label Nov 2, 2021
@GeekyEggo GeekyEggo added this to the vNext milestone Nov 2, 2021
@GeekyEggo
Copy link
Owner Author

Quick update; this evening I updated to the Windows Insider program to get access to Windows 11. I've located the bug, and will be working on a fix tomorrow.

GeekyEggo added a commit that referenced this issue Nov 3, 2021
@rikward
Copy link

rikward commented Nov 3, 2021

For what it's worth, I checked this out, built it (minus the UI) and it's working again for me 👍

Thanks! 💯

@GeekyEggo
Copy link
Owner Author

That's great news, appreciate you testing it, @rikward. Once I've tested it's still working on Windows 10, I'll release a new version on the official store.

GeekyEggo added a commit that referenced this issue Nov 3, 2021
@Loco360
Copy link

Loco360 commented Nov 9, 2021

You know when the update is ready? @GeekyEggo

@GeekyEggo
Copy link
Owner Author

@Loco360 I haven't had a chance to test Windows 10 yet sadly; you can however download the beta version directly. This will include the fix for Windows 11. (download link)

GeekyEggo added a commit that referenced this issue Nov 15, 2021
@GeekyEggo
Copy link
Owner Author

Merged to main.

@ManaHime
Copy link

I'm having this issue with latest Windows 11 and
Stream Deck version: 5.1.3.14750
Sound deck version: 3.0.2

When I press the button to change the forground app audio device the only thing that happens is that there is a triangle with a exclamation mark that appears on the stream deck button.
Is this normal?

@GeekyEggo
Copy link
Owner Author

@ManaHime that's odd, let's see if we can determine what might be causing the problem.

  1. Is this a new action, or a previous action?
  2. Is the "Audio Device" correct in the action settings? (Windows 11 is frequently resetting device IDs, so you may need to re-select it).
  3. What application are you trying to set the device for?

@ManaHime
Copy link

1: I tried creating a new action because the previous actions did not work.
2: I have noticed this so I usually make sure to look at the audio devices when I restart my computers (otherwize they'll default to something I don't want to use, like the wireless adaptor for my wireless headphones)
3: I've tried both Chrome, Discord and Parsec.

So I just
1 create a new action
2 then set the audio device I want to use
3 alt tab to the app
4 press the button
5 only a triangle appear with no change in audio device

@GeekyEggo
Copy link
Owner Author

If you're happy to, would you mind uploading your log files; they can be found here: %APPDATA%\Elgato\StreamDeck\Plugins\com.geekyeggo.sounddeck.sdPlugin\logs

@ManaHime
Copy link

Thank you so much for your help.
It turns out that somehow now this is working correctly with Parsec and Discord (go figure... I blame murphy's law); however, Chrome is still messing up for some reason.

SoundDeck.log

@GeekyEggo
Copy link
Owner Author

GeekyEggo commented Nov 24, 2021

Thanks @ManaHime; this might be related to applications that use multiple processes. Nothing jumps out in the logs, but I'm going to add a bit more information so that should it happen again in the future we'll know more.

@ManaHime
Copy link

@GeekyEggo Thank you so much for the help!
Not having the ability to change the device for Chrome (and Edge... though I don't use Edge) is a little troublesome, but the really important thing for me really was Parsec, and since that works I really don't mind about anything else ^^

I'll post again if I find more information ^^

Thank you very much!

Mana

@GeekyEggo
Copy link
Owner Author

@ManaHime out of curiosity, does Chrome work if you configure the action to use "By Name", with "chrome" as the name value.

@arimorcos
Copy link

@GeekyEggo I'm also having this issue, trying to switch chrome between default output and headphone chat output. Here's an image of my two configs:

image
image

When I click the buttons, it shows a checkmark, but looking in volume mixer, the audio output does not change. I've also tried with "chrome.exe"

Thanks!

@GeekyEggo
Copy link
Owner Author

@arimorcos, your configuration looks correct. Having recently helped a friend with audio problems relating to the Wave Link, I wonder if the problem might relate to the wireless headphones. This is purely speculation, but in her case she had two devices listed for the same wireless device; one was named "Headphones", and the other "Headset". Are there two listed for you also?

@arimorcos
Copy link

@GeekyEggo, thanks for the quick reply!

There are multiple headphone devices, but they all refer to different audio outputs. See photo here:
image

I've checked for logs, but there's no log file in %appdata%\AppData\Roaming\Elgato\StreamDeck\Plugins\com.geekyeggo.sounddeck.sdPlugin

@GeekyEggo
Copy link
Owner Author

Oh wow, that's a lot of virtual devices for a headset. 😅 Out of curiosity, does it work if you attempt to change between two wired devices, e.g. the LG monitor, and "Realtek Digital Output"?

Logs should be available at %appdata%\Elgato\StreamDeck\Plugins\com.geekyeggo.sounddeck.sdPlugin\logs.

@arimorcos
Copy link

arimorcos commented Sep 2, 2022

Haha, ya most of them I never use. I actually just disabled most of the them but it still doesn't seem to work. Also doesn't for any of the other audio devices.

There was one thing in the log just now:

2022-09-02 15:47:52.2237 [ERROR] SoundDeck.Plugin.Actions.SetAppAudioDevice: Failed to set app audio device; AudioDeviceId="{0.0.0.00000000}.{4082c9ca-dbaf-427a-b0ff-52c755e23866}", ProcessSelectionType="ByName", ProcessName="chrome.exe".
System.Collections.Generic.KeyNotFoundException: Unable to find audio device with key {0.0.0.00000000}.{4082c9ca-dbaf-427a-b0ff-52c755e23866}.
   at SoundDeck.Core.AppAudioService.GetDataFlow(String deviceKey) in C:\git\SoundDeck\Src\SoundDeck.Core\AppAudioService.cs:line 171
   at SoundDeck.Core.AppAudioService.SetDefaultAudioDevice(IProcessSelectionCriteria criteria, String deviceKey) in C:\git\SoundDeck\Src\SoundDeck.Core\AppAudioService.cs:line 86
   at SoundDeck.Plugin.Actions.SetAppAudioDevice.<OnKeyDown>d__4.MoveNext() in C:\git\SoundDeck\Src\SoundDeck.Plugin\Actions\SetAppAudioDevice.cs:line 45

However, I've pressed the button and gotten a check a bunch since 15:47, and it only seemed to log an error that once even though it didn't change the output device of chrome. It also doesn't seem to work for other apps or foreground process.

@GeekyEggo
Copy link
Owner Author

Apologies for my late response @arimorcos; I find it particularly odd that it works sometimes, and not others, ha 😅. Since your post, have you had much luck with the action?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something might not be working as intended.
Projects
None yet
Development

No branches or pull requests

5 participants