-
Notifications
You must be signed in to change notification settings - Fork 19
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
Better support for multiple output devices #40
Comments
Thanks for your feedback. Are you using the latest release or the master branch? I assume, with "stream" you mean output device? Currently all actions on the status icon (context menu mute, icon double click mute and mouse wheel volume change) work on the default PulseAudio output device. volctl is intentionally kept simple. It's primary use case is to control application volume levels using one main output device (though you can control mute/volume for other devices using the slider popup). Having the status icon to control all output devices at once might be a bit counter-intuitive. E.g. what happens if one raises the master volume, having devices with different volume levels. Should they all increase volume at once? Should they "jump" to the same level (very awkward) or adjust relatively to each other? What is if people have multiple audio devices and don't want all volumes/mute to be adjusted at once (listening to music on one device and doing all other things on a separate device). Also, I think, there are setups/audio interfaces that have multiple (virtual or hardware) output devices that should not be adjusted. That being said, I presume the current behavior is the sensible default. But I could imagine having a toggle option for this. PR very welcome. |
I am using the current release in Arch linux AUR which is 0.8.2 and by "stream" I meant the Playback AudioStream as in the first tab of Pavucontrol. Left click on the tray icon shows a volume control, which can set the volume for each Output Device, and for each AudioStream. It can also mute any one of the Output Devices or AudioStreams individually, which is pretty cool. I like the fact that volctl is simple and straightforward and I would not wish to change anything except that I find it counter-intuitive to have the tray icon showing that the audio is muted while I am listening to the internet radio. All I would suggest is that the icon only shows as Muted if ALL the devices (or the audiostreams) have been muted, and if the mute option is selected on the pop up menu then ALL the devices (or audiostreams) should be muted. Since volctl already knows the state of the devices and audiostreams (see the volume control) this should not be a major change. |
Your interface is outputting audio when it's muted? That would probably indicate an issue with your audio setup but is not related to volctl, right? Or are you suggesting there's a bug in volctl that shows your interface as muted while it's actually not?
IMO the current behavior is the most intuitive: Show muted when muted, show unmuted when unmuted. But I might not fully understand the issue you are addressing. |
I suggest @FDServices should share a screen capture of the problem since I think miscommunication is likely here. |
I am afraid that I have not made myself clear. I have two output devices.
Audio is streamed to Muzilli |
Ok so, I agree with both of you - I do think that it's a problem, but I also think muting all output streams by default isn't the right choice. I think the best option would be a toggle in the settings that turns on/off if all output devices or just the default one is targeted. I don't have time for a PR right now, but I'm sure someone will come along sooner or later. |
That was the missing bit. So, I understood you correctly in my first answer. TL;DR The volctl status icon controls/displays the state of your primary output device.
Such functionality comes with edge cases and needs to respect all possible user configurations, like virtual output sinks, etc. This sort of complexity I'd rather like to avoid. To quote from the README:
Having volctl icon handle the default audio device and nothing more is as simple as it gets. On/off, done. Putting the state of multiple audio devices into one status icon does not feel right. I'm afraid it might create more problems that it's trying to solve. Possible options for handling multiple output devices in volctl:
(Alternative A/B would probably need a toggle list in the settings, so the user can explicitly select the devices that should be controlled by volctl.) A PR for a new status icon behavior could implement alternative A and/or B, preferably both. |
That all sounds far too complicated. May be Volctl should act on the active sink instead of the first sink? Edit: changed "default" sink to "first" sink. |
Exactly.
What's an "active sink"? |
The active sink would be the sink that is running, unfortunately there may be more than one, so that would be a problem. How about using the default sink instead? |
OK, I have tried to set out my thought process as follows: The default sink is the one that will be used for any new output that does not have a previously defined sink. It is the one marked with an asterisk in pacmd list-sinks:
So, I have two sinks, if I start two audio streams then they will both play through the default sink (hideous):
If I mute that sink then both audio streams are silent, muted (much better). However I can send one of the audio streams to the first sink and it will play through that, while the second will play on the default sink, both sinks are now active (RUNNING):
If I mute the default sink, the audio stream for the first sink will continue to be heard. This is why I suggested originally that a simple mute action should mute both sinks, or better, mute all the sinks that are not already set to mute. Subsequently an unmute command would unmute all of the same sinks. The logic being that when the phone rings I want all the sound to be muted so that I can answer the phone. Fine control of the sinks and the audio streams can always be made through the left-button pop up volume control. |
I'm against introducing any of this overly complicated logic (like filtering for state, etc.). It only introduces more edge cases, undesired behavior and complexity. The status icon actions would refer to a changing list of output devices, the user would not know what devices are actually affected. (Like muting -> mutes two devices, 1 second later unmute -> unmutes three devices). I'd like to advocate the KISS principle and I opted for a simple design in the first place for a reason.
You want volctl to cover your personal use case which is understandable. But you need to keep in mind that there are a million of use cases and user preferences out there. I will not be able to satisfy every single one of them. As an interesting side note, not even pavucontrol covers your use case. You would need to mute every single output device just as it is the case with volctl. That being said, I think we're going around in circles here. For now, let's see if somebody wants to pick up on creating a PR for general improvement on multi device support, or even implement a "global mute" as you envision, I'm totally up for that. The only requirement being, keeping the complexity at a minimum. |
Not as suggested. The icon would simply show muted or unmuted as at present. The difference being that muted would mean that all the "running" sinks were muted.
In fact I suggested that if two sinks were muted then unmute would revert the same two sinks to their original unmuted state. No problem, volctl works fine if you only have one sink, and I like the pop up volume control :). |
As mentioned, the user has no means of knowing which devices are "running" currently. On top of that, the list of "running" devices changes over time. As a result, you'd end up with unpredictable behavior.
Not really. What if the devices were already muted? You would not have that information and need to fall back to some other (undefined) behavior. Or the user would unmute after 2 weeks, should volctl then remember the muted devices from 2 weeks ago? Or the user adds/removes devices at runtime, and so forth... It just doesn't add up, no matter how you look at it. We have some proposals on how to proceed with this. This discussion is not going anywhere. Let's call it a day. |
First, I just came across volctl, thank you for this programme.
The Mute options give slightly unexpected results in that if I use the Mute button on the pop up menu, volctl mutes the default stream and turn the systray icon to "muted". A left button click on the icon will show the volume controls for all the streams, with the default stream muted while any other streams could be either open or muted.
This means that I am now listening to the radio over the internet, with the volume icon showing as muted!
I can mute or unmute each stream from the volume controls, so I wonder if the Mute button is actually necessary.
My suggestion would be:
Of course the volume controls still allow indivual streams to be muted or unmuted.
The text was updated successfully, but these errors were encountered: