Giter VIP home page Giter VIP logo

Comments (8)

radj307 avatar radj307 commented on June 10, 2024

Thanks for the suggestion!
I have implemented active-application-specific actions as of c19a22b

Things that could still be improved:

  • Notification window does not appear when changing active application volume/mute state.
  • (EDIT) Some multi-process applications just don't work with this method (fixed)

from volume-control.

radj307 avatar radj307 commented on June 10, 2024

I backported this feature to v5.2.5 as an addon.

image

Installation Steps

  1. Download & extract this archive: Addon.ActiveApplicationActions.dll.zip Addon.ActiveApplicationActions.dll.zip (v2)
  2. Place Addon.ActiveApplicationActions.dll in .../AppData/Local/radj307/Addons (create any missing directories)

Tip: You can quickly open the .../AppData/Local directory by pressing Win+R and entering %localappdata%

from volume-control.

muffinimal avatar muffinimal commented on June 10, 2024

Great stuff! Thanks for getting back this fast!

Sadly I need to report that the addon doesn't seem to do anything. I set the addon up, bound some hotkeys to Active Application Volume, enabled them. And... Nothing happens.

So, I am on 5.2.5 on Windows 11. Nothing of note in the logs (set to DEBUG). Tried rebooting.

from volume-control.

radj307 avatar radj307 commented on June 10, 2024

Make sure you activate the window you're trying to control first. The easiest way to do that is to just click on the window.
This technique should work with pretty much any window that outputs audio, but please let me know if it doesn't work for something specific. (I imagine Discord probably doesn't play nice with this)

active

Edit: I have found that a few multi-process applications just don't work with this method at all (Discord, Deezer). This is probably because they have separate processes handling the window & audio output.
I'm looking into a more robust method that will hopefully fix this issue.

from volume-control.

muffinimal avatar muffinimal commented on June 10, 2024

from volume-control.

muffinimal avatar muffinimal commented on June 10, 2024

Yes, you're quite right. The addon doesn't work in Chrome, but it does in Firefox. I do get a
[WARN] Session '7500:chrome' doesn't exist; searching for near-matches...

I think those warnings are at startup, though.

I have tried your rc. What I am trying to achieve can be done by using the targets, however. I should play with some multi-processes, though. It is slightly a bit more hassle to setup as you need to provide multiple targets. Got a release-date for it set yet? I can fiddle around to see if I find anything else.

from volume-control.

radj307 avatar radj307 commented on June 10, 2024

I improved the robustness of finding the active application by falling back to searching for the foreground application's process name if the PID wasn't found.

Try replacing the other DLL with this one: Addon.ActiveApplicationActions.dll.zip (v2)

These changes are also included in the main branch as of 967c587

from volume-control.

radj307 avatar radj307 commented on June 10, 2024

Included in 6.0.0-pr3 (Preview 3) and up

from volume-control.

Related Issues (20)

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.