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

Using #2

Open
renato-caruso opened this issue May 18, 2020 · 3 comments
Open

Using #2

renato-caruso opened this issue May 18, 2020 · 3 comments

Comments

@renato-caruso
Copy link

Sorry for my ignorance, but how can I use this to control an application volume like the Windows Mixer Volume GUI?

I'm making a 'sound table' ...
I already develop with Arduino and I already have my control device ready, but I want to interact with the windows mixer, and I wanted to do it with python ...

@kdschlosser
Copy link
Owner

well that depends on how you want to interact with the sound mixer. You have the capabilities of altering endpoints which would be speakers, headphones, microphones, etc...

You will not have the ability to alter sessions. so if you see a volume slider for say Firefox or Google. These are controlled by the application and cannot be changed by another process. This is done as a protection so applications cannot hijack another applications sound session.

The Windows Core Audio API is mostly geared to what you see in the sound control panel. So you have the ability to set channel volumes and set the master volume. get events for when the volume changes. I do manage to locate a hole in the core audio api that does allow me to get events when changes are made to a sessions volume or when a session starts and stops audio playback and also when a session gets created or destroyed.

you also have access to the peak meter which is a good mechanism to be able to tell if there is actually audio being played to an output or being received from an audio input like a microphone.

How familiar are you with Python and programming?? This is going to let me know what your experience is so I use verbage that will be better understood.

@renato-caruso
Copy link
Author

I study Python in college and develop web with Ruby, PHP and JavaScript.
If with this package there is no possibility to change the volume of an application, I will not be able to do what I expected. Do you know if it could be in .NET Windows SDK? Probably not, I understood the vulnerability ...
Can you imagine a way to be able to control audio sessions through an application? Would a driver be needed?

@kdschlosser
Copy link
Owner

Windows API .NET or C does not provide any way of controlling the volume of a session that another application created. Not saying there is not a way to do it. I do not know of it if there is one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants