-
Notifications
You must be signed in to change notification settings - Fork 32
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
allow to change volume at higher resolution #100
Comments
Allowing decimal numbers for For the popup dialog, I think it would make sense that the
Alright, let's suppose that the Now, the mapping: I'd say that we map this Ok, the only problem with this mapping is that currently, mouse-wheeling on slider is tied to OK, so to sum that up: we would have only one setting in the UI Simple and consistent. What do you think of that ? |
Could work...
I thought about this and I can't make my mind if it's better to have one or two settings for this. Maybe others have an opinion. I can see arguments for and against each solution, so it will be a matter of developer preference. The argument for keeping things separate (as it is now) is that people may be using rough steps (e.g. 5%) scrolling while hovering the icon, and fine steps (e.g. 0.5%) when popping up the slider. I think this arrangement is intuitive and makes sense. This would imply though adding another pref, which might be confusing UI-wise.
Scrolling is not reserved for mouse wheels. I think
This could be hardcoded (OK as far as I go) or a separate pref (but this might feel like too much for the GUI). Allowing decimal numbers is ultimately the key part here and hopefully an easy one. |
See Pull Request #115 After giving it a second thought, I implemented it exactly as you suggested @landroni, it seemed the easiest and the most intuitive. See screenshot below: Basically everything is tied to Any comment ? Otherwise I'll merge that |
Now, you may notice that, in the So the current situation is that we have three volume step settings: two (normal step & fine step) that are used for both mouse and keyboard (when the popup GtkScale has focus), and another setting that is used for HotKeys. We could make it simpler, and have only two settings (Hotkey would use the same scroll step as the rest). Or we could make it more complicated and more flexible, and have four settings: one for the mouse scroll, two (normal step & fine step) for keyboard shortcuts inside popup, and another for Hotkeys. At the moment we're halfway between the most complicated and the most simple solution... Any thought on that ? |
Scroll rework, allow volume change at higher resolution #100
Merged |
Sorry for looking into this so late! Real life intervened. I am trying to check out current master but something goes awry. After building fine, I want to run pnmixer in place (without installing), but it ends up with this error:
Is this expected? |
Not really. But wait a little bit. I'm currently in the process of re-writing a big deal of PNMixer code. Doing so I found that the changes I made regarding this ticket were not complete. I missed plenty of things, so the "higher resolution volume changes" is probably bogus on the master branch. However I think I'll be done with the PNMixer rewriting in a few days. At this moment, I will need people around to help me with testing. If you're available, it will be great ! |
Sounds great. Will try the code in the following days. |
I remember that you had a weird setting with different cards etc... It would be great if you could test that a little bit again. Here I don't have a USB dac anymore, the best I could do was to create a dummy virtual alsa card and play a little with it. But it can't be as complete as the test you can do with your setup. |
I'm trying the pnmixer-dirty branch and I still get an error when executing in place (without make install):
** (pnmixer:4228): WARNING *: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-cm8tMrUfrt: Connection refused
I am not sure if something is wrong with the local setup or not. In any case, right now I'm using Alsa but no fancy USB DACs. |
The "WARNING"comes from Glib or Gtk+, given the look of it. I never saw this warning before, but I don't think it's relevant. The error means PNMixer don't find the UI file. I think I know what's wrong. When you start PNMixer from source, ALWAYS launch it from the root directory. That's to say, DO NOT do This is because PNMixer looks for the files it needs in |
Please also ensure that your git directory is clean ( |
Exactly! I must have forgotten this. Now it launches. Here are some messages on hte console:
** (pnmixer:11348): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-cm8tMrUfrt: Connection refused (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkAccelLabel.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkAccelLabel.margin-end (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkAccelLabel.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkAccelLabel.margin-end (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkAccelLabel.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkAccelLabel.margin-end (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkAccelLabel.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkAccelLabel.margin-end (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkAccelLabel.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkAccelLabel.margin-end (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkAccelLabel.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkAccelLabel.margin-end (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkBox.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkLabel.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkLabel.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkCheckButton.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkEntry.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkBox.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkLabel.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkLabel.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkCheckButton.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkEntry.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkBox.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkLabel.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkLabel.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkCheckButton.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkEntry.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkBox.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkLabel.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkLabel.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkCheckButton.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkEntry.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkBox.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkLabel.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkLabel.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkCheckButton.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkEntry.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start (pnmixer:11348): Gtk-WARNING **: Unknown property: GtkTable.margin-start
|
As a note, I know PulseAudio is not supported, but when using it with PA running I never felt like pnmixer was broken. Now with PA running I notice this funny behavior: Then I change audio levels in pnmixer using scrollwheel on top of the icon, and while both xfce4-mixer and pavucontrol change to the correct level (say, 69%), pnmixer stays glued to the previous level (44%) both in tooltip icon and pop-up indicator. After I resync all mixers, I change levels in pnmixer pop-up by scrollwheel: other mixers and pnmixer pop-up display correct level (say, 69%), but pnmixer icon and tooltip display previous level (44%). |
Hi ! Do you use Gtk2 or Gtk3 when you compile PNMixer ? (If you don't know, it means Gtk3). Which version of Gtk is installed on your system ? About Pulse: yep, PNMixer uses alsa and is not aware of Pulse. So it causes various problems. As long as nobody implements a proper PulseAudio backend, it will be like that I'm afraid... |
Gtk3 v3.10.8 |
OK, it appears that the I'll update the Makefile to ensure proper Gtk+ version. I guess the UI must look a little weird for you, things may be out of place. OK, appart from that, do PNMixer behave? |
UI is OK, I think. I see a largish margin, but I suspect this is one of Gtk3's easter-eggs: Also, the Mute/Unmute seems to misbehave: it works alright, but after muting the checkbox doesn't appear as "checked". Actually, I would suggest simply naming it "Mute Volume". If checked, muted. If unchecked, unmuted. Visually display when checked/unchecked. |
Yep the margin is a Gtk3-only feature :) Maybe it will disappear one day without notice, the same way it appeared. For the Mute/Unmute label, I agree for the renaming, I would prefer a simple "Mute Volume". For the misbehave: do you have anything weird in the logs (with |
Also, are you testing with a USB card ? Some USB DAC don't have a hardware mute switch. In this case, PNMixer don't tell you anything, but it considers that the card is always unmuted. Clicking on the mute checkbox should have no effect: sound shouldn't be muted, and the UI should always appear as umuted. |
No, no USB card this time. But I am using PA, so possibly that's generating issues... And I don't get any messages at all when hitting mute/unmute even with |
Ok, there shouldn't be any message so it's fine. It's likely that PA causes the issue. PNMixer relies on a callback mechanism from Alsa to update its status. If the callback is not invoked (maybe because somehow PA takes precedence), then PNMixer doesn't update its appearance. |
But then it's strange because with the released pnmixer when hitting Mute its tray icon becomes disabled, whereas with the rewrite nothing happens. My suspicion is that a small bug has crept up in the rewrite; possibly it's evidenced by PA, but I think it wasn't there before. Same with the out-of-sync volume between tooltip and pop-up as described in #100 (comment). I believe that what is displayed by pnmixer should always be in sync, so possibly some UI-element doesn't get updated in the new infrastructure. |
Hi ! Also please let me know if you have the opportunity to play with your fancy USB DAC, and the slight volume variation (like 0.1 steps in fine steps), tell me if it works as expected. Thx ! Branch to checkout, just as a reminder: |
Hi! I tried to build pnmixer, but I hit a snag at this point:
If the minimum requirements stay like this, I'm not sure I can test the new pnmixer.... Using Ubuntu 14.04 LTS. |
Yep, I just updated the minimum requirement according to the problems you run into last time with Gtk. You can tweak the
Then reconfigure, and PNMixer should compile just fine. Sorry about this inconvenience. |
Thanks! Now it works. I also had to:
Now There is a very minor issue: for some reason the tooltip often displays volume level Will check the USB DAC later (along with the fine steps) as I will need to make some changes to the system in order for that to work... |
Thanks a lot for such feedback. Indeed the tooltip value was lazily casted from double to integer. I replaced it by a proper |
Hey, I just found and fixed bugs with the volume slider. This part is very tricky to be done properly ! Be sure to checkout the last version ;) |
Thanks. Now the tooltip offset is definitely fixed. Will try out other use cases later on... |
There is another bug I may have run into --- try Prefs > Disable Notifications > OK. Here notifications remain enabled... The settings don't seem to get saved. (I should mention that I run pnmixer in-place, without installing.) |
Can't reproduce that, maybe it's config file skew. |
Can't reproduce either. I also run in-place, it shouldn't have any influence. Any weird lines in debug messages ? |
None that I can see. I'm still using gtk 3.10.8, but I guess this shouldn't affect something like this.
|
Actually I can see this issue for other tabs as well. For instance, I check |
Hmm, the first of the logs you have is interesting.
I remember seeing that and digging into it a little bit, but in the end it turned out that this was just a compile issue. Did you try to make some cleanup and recompile, like:
Also, can you run PNMixer with the Thanks ! |
Did all this, but still no luck:
|
Hi, |
I cleaned up the tree, pulled, and recompiled. It seems like the dialog ends up with code
|
My dialog responses are: -6 when I click Cancel, and -5 when I click OK. Apparently you have 0 and -4. It's surprising... |
Even more surprising: I get |
I get In the ui file, I use a string to define the response sent by the button. That's to say, for the ok button, I define the response as "ok" (a string). Then somehow, this is converted to an enum value It's probably the problem. I don't think I ever found a place where this stuff is documented. It must be somewhere, but I didn't find it. So I processed by trying. Ok, so, please, just have a look in
Replace |
It does. Now I get the expected exit codes, and prefs are being saved... |
Pushed ! Thx again for the time and patience ! |
Thanks for addressing these esoteric concerns! :) |
Since we're discussing the recent port here, if I may interject a very small cosmetic request: It always felt to me like the Device tab in Prefs should be the first one in the list, followed by View and all the other. If people need to change the device often (add USB DAC, connect HDMI, etc.), then it would make sense to make the Device choices handy. View on the other hand is something you would set up once and forget about it... (Let me know if it's best that I open a new request about it.) |
Yep, maybe just copy paste that in a new request that would be nice. I personally don't mind were the Device tab is. Your argument makes sense. |
Done. Another thing: What does |
Hmm, yes, I'm not even sure Without But back to PNMixer, if you don't check The That's basically my understanding of the thing. I worked a little bit with in acoustics at some point, so I know a little bit. But I may be wrong in the details, don't trust me too much ;) As for the tooltip, I'll think about it. I agree that more explanation is needed. A tooltip may not be the right thing, since we have no tooltip at all in the ui. How can user guess that there's on here ? |
Good explanation, thanks. The way tooltips usually work is that when the user is unsure of what a given checkbox will do they will often hover the said checkbox to see if anything pops up. Sometimes users will try to enable/disable the checkbox and if a tooltip pops-up then they will have at least some info on what it does. That's my experience with tooltips from other projects. |
Please allow for more fine-grained volume changes. While the default percentage steps, 1% or 5%, work very well for a majority of users, there are cases when a user would need 0.1% steps. For instance some USB DACs have so much power, that already at 4-5% it already gets too loud for safe listening, while 1% may be too low. With traditional stepping it's hard to find a useful sound level.
One way to deal with this would be to allow decimals in
Mouse Scroll Step
. For instance a step of 0.1% would be a big improvement. In addition to this, aScroll Step
for the pop-up dialogue would also be useful; now it seems to default to 1% or in the whereabouts, but allowing to go in the decimals would help.Some mixers provide this feature. QasMixer has an unfortunately named
Number of turns for a slider change
. Maxing it allows for about 4-5 steps within a percentage (i.e. ~0.2pp resolution). Here's how their option looks like:The text was updated successfully, but these errors were encountered: