dlprows / FocusVolumeControl

Stream Deck+ plugin for controlling the focused application's volume
MIT License
5 stars 1 forks source link

Not detecting correct focused audio source #4

Closed X-Olem-X closed 1 year ago

X-Olem-X commented 1 year ago

So, back again with a new problem!

When using a program such as Voicemeeter to split audio streams between game and system, the plugin will for example display the correct focused game, however while the percent goes up and down, no audio is adjusted. When using the official volume controller and selecting the game, it controls audio just fine.

Interestingly when using cyberpunk 2077 specifically, your plugin will name the game 'Cyberpunk 2077' the manual official plugin names it 'Cyberpunk2077' with no space. Seemingly seeing something else. But this affects any game when splitting audio streams.

Hoping you might be able to have a solution for this one. Thanks.

dlprows commented 1 year ago

Well the good news is I think I know what's going on. I've never used Voicemeeter before, so its a use case I hadn't run into. The bad news is that it'll probably be a little bit before I get time to work on it. Hopefully this weekend.

The way the plugin is written, it doesn't look at an applications output device. it just looks through the default playback device. So if you open the volume mixer, and have your default output device set to "VoiceMeeter Input" but then you change a specific app to "VoiceMeeter Aux Input" and then play with the volume knob, you'll see the number change in the volume mixer, but its not actually doing anything. However, if you change the volume in the volume mixer, its actually changing the volume for that app in all outputs.

So basically, Windows has separate volume levels for each app -> output combination, and I'm only changing the output for the default audio output instead of for all outputs.

It should be fixable, time permitting.

As for "cyberpunk 2077" vs "Cyberpunk 2077" its to be expected. Though for a frustrating reason. There's no official documentation on how microsoft gets from a process to the process name as it appears in the volume mixer. So if i run something like halo master chief collection, the plugin says "MCC-win64-shipping" even though the volume mixer, and the elgato volume plugin says "Halo: The Master Chief Collection" (don't test this one, there's a bug fix I've been working on for halo master chief collection specifically)

Its something I want to fix/make better, but since its working "good enough" to tell what you're about to change the volume of, I haven't had time to go back and make improvements.

X-Olem-X commented 1 year ago

Ah, thank you for the full explanation, and I am going to assume then that the default plugin by Elgato must be changing all outputs for the selected program rather than the default, and why it remains functional, causing the volume mixer level to still move.

I would then also imagine that this might become a problem for others, as anyone attempting to stream audio from a game or other application right now, as splitting off the audio streams is a common enough method to isolate the focus.

And I wasn't too worried about the actual naming convention, so much as.. pointing out the difference, the plugin already easily identifies what the source is fortunately.

Thank you for figuring it out so quickly though. Still surprised this type of plugin wasn't a built in feature to be honest, such an obviously useful/needed one.

dlprows commented 1 year ago

I have a pre-release build I'll be spending some time testing https://github.com/dlprows/FocusVolumeControl/releases/tag/v1.2.0

it addresses the voicemeeter issue, as well as some other improvements

X-Olem-X commented 1 year ago

After using it most of the day, can safely say that the issue has been solved, not had any problems controlling the audio regardless of output now. Thanks!